ASP Application Start global.asa
-
I guess this is a simple problem for which I do not have an answer. The following is taken from "global.asa" for an ASP application. It simply calls a method that parses an XML file (LoadSiteConfig). This method is included in loadsiteconfig.vb. However, it appears that the method LoadSiteConfig is not called on application start. I'm suspecting there's some syntax error the way I included the source "loadsiteconfig.vb" using the "src" attribute: sub Application_OnStart LoadSiteConfig() end sub sub Application_OnEnd end sub Here's what "loadsiteconfig.vb" looks like: Function LoadSiteConfig() ... parses an XML file using Server.CreateObject("microsoft.XMLDOM") ... End Function Am I doing the right thing? The way I included the ".vb" file in "global.asa"?? I'm having some trouble to trace where it went wrong that the function is not called it appears. Thanks!
-
I guess this is a simple problem for which I do not have an answer. The following is taken from "global.asa" for an ASP application. It simply calls a method that parses an XML file (LoadSiteConfig). This method is included in loadsiteconfig.vb. However, it appears that the method LoadSiteConfig is not called on application start. I'm suspecting there's some syntax error the way I included the source "loadsiteconfig.vb" using the "src" attribute: sub Application_OnStart LoadSiteConfig() end sub sub Application_OnEnd end sub Here's what "loadsiteconfig.vb" looks like: Function LoadSiteConfig() ... parses an XML file using Server.CreateObject("microsoft.XMLDOM") ... End Function Am I doing the right thing? The way I included the ".vb" file in "global.asa"?? I'm having some trouble to trace where it went wrong that the function is not called it appears. Thanks!
Doesn't a Function have to return a value in VBScript? I don't use them often enough to be sure, but I seem to recall that functions have to be used on the right side of an assignment operator, while Subs can be called as freestanding entities. Try changing the Function to a Sub in loadsiteconfig.vb and see if that helps. "Your village called -
They're missing their idiot."