I wrote:
I have one IIS 6 machine that seems to ignore global.asa completely.
I can't get *anything* to fire -- not Session_OnStart (), not typelib
declarations. This is true in the web root as well as in any
application folder.
[Aaron - consider adding to
http://aspfaq.com/show.asp?id=2076
(c) you are looking at the wrong global.asa ]
OK, I have isolated the problem, and found that it is not new to IIS 6. Let
me see if I can explain it adequately...
I have two IIS applications - call them /App1/ and /App2/. /App2/ contains a
utility that is meant to be executed from anywhere on the server:
Server.Execute( "/App2/MyUtility.asp") [1]
I was using a typelib declaration in the global.asa in /App2/, but not in
/App1/. The error message read something like this:
'adCmdStoredPro c' is undefined
/App2/MyUtility.asp, line xxx
Because of the error message, I focused all of my attention on global.asa in
/App2/, which bore no fruit. I was unable to get *anything* to register. I
then looked outward, to the root global.asa document. Again, I could not get
the script to recognize the typelib declaration.
When troubleshooting this, I set up a parallel web site on port 8000, with
the same root and with identical IIS settings [2]. It appeared to function
properly. But I was only looking at one aspect of functionality. When I
realized I needed to create an application for the /App1/ folder, it broke
again, and I figured out the original problem: Even though MyUtility.asp
runs in its own space and has its own application, the global.asa (and
presumably the application variables) of the CALLING script applies.
It turns out that those typelib constants are not inherited by nested
applications. When I set up the parallel web site, the root global.asa
(which I had modified when troubleshooting the original) applied to the
nested *folder*. When that folder became an *application* it no longer
applied.
So it appears that the red herrings were (a) that this occured on the new
server (IIS 6), but not on the old IIS 5 one [3], (b) the path provided by
the error message, and (c) my mistaken belief that I had mirrored all
settings.
Ugh.
[1] Server.Execute is used instead of #include because (a) the scripts need
not communicate, and more importantly, (b) it can be called from either
VBScript or JScript
[2] Or so I thought
[3] The need for an IIS application was also new, and the developer did not
adequately explain this to me or I did not adequately listen
--
Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.