Forum Moderators: open

Message Too Old, No Replies

global.asa use on shared secure server

if possible, how do I set this up?

         

macrost

3:55 pm on Apr 6, 2004 (gmt 0)

10+ Year Member



I need to use a global.asa file on a secure server. I put the global file in the root of my directory, but it isn't working.

Any ideas?

Xoc

7:46 pm on Apr 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The global.asa needs to be at the root of the web site. It doesn't work in a virtual directory.

TheNige

7:54 pm on Apr 6, 2004 (gmt 0)

10+ Year Member



You can put the global.asa in a virtual directory. In IIS make sure that the global directory is running as an application. Go to the properties of the Virtual Dir and click "Create" in the Application settings section.

I'm not sure if that is the problem you are running into though.

macrost

8:25 pm on Apr 6, 2004 (gmt 0)

10+ Year Member



Ok, so, here's what I'm on. I'm on a virutal secure server. I need to get my host to allow this... does the virtual thing that TheNige was talking about work this way?

Thanks!
Mac
<added>
Ok, got my host to do that, and the asa has fired. One question, if I have a response.write within a session_onstart, wouldn't that carry all the way through the site?
</added>

john_k

9:24 pm on Apr 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



if I have a response.write within a session_onstart...

No. The global.asa is NOT an include file. The *_OnStart functions it contains are called by IIS at specific times and always PRIOR to executing the .asp page that fires them.

So Session_OnStart executes the first time the visitor hits a page within your application. I don't recall if it is on the first ASP page they hit or on the first ASP page they hit that utilizes the Session object. Either way, IIS executes the function and then processes that page. Any pages they hit after that do not cause that function to be executed.

Similarily, the Session_OnEnd function is called AFTER the Session object is destroyed because session timed out or was explicitely abandoned using Session.Abandon.

Xoc

1:53 am on Apr 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Didn't know that making a virtual directory an application would cause the global.asa to fire. Cool!