How the Global.asa file changes will take effect?

P

Prabhat

Hi All,

My website is hosted with the ISP and recently I have modified my Global.asa
file for the ASP application.

So I think we need to restart the World Wide Web Publishing Service so that
the changes in the Global.asa will take effect. I think it will be difficult
for the ISP to restart the Service as there many applications will be
running. So can you suggest how can my global.asa file changes will take
effect so that I can deply those changes?

Thanks
Prabhat
 
E

Evertjan.

Prabhat wrote on 11 okt 2005 in microsoft.public.inetserver.asp.general:
My website is hosted with the ISP and recently I have modified my
Global.asa file for the ASP application.

So I think we need to restart the World Wide Web Publishing Service
so that the changes in the Global.asa will take effect.

No, see below
I think it will
be difficult for the ISP to restart the Service as there many
applications will be running. So can you suggest how can my global.asa
file changes will take effect so that I can deply those changes?

ASP is reported to re-read global.asa after each change in content [size?]
when the first subsequent page is called.

I suppose this means refiring the Application_OnStart sub
[hopefully after a Application_OnEnd]
so a reinitialising of any values [counters!]
placed in the application object,
but not switching of any current sessions.

Is this true, group?
 
K

Ken Schaefer

: Prabhat wrote on 11 okt 2005 in microsoft.public.inetserver.asp.general:
:
: > I think it will
: > be difficult for the ISP to restart the Service as there many
: > applications will be running. So can you suggest how can my global.asa
: > file changes will take effect so that I can deply those changes?
:
: ASP is reported to re-read global.asa after each change in content [size?]
: when the first subsequent page is called.
:
: I suppose this means refiring the Application_OnStart sub
: [hopefully after a Application_OnEnd]
: so a reinitialising of any values [counters!]
: placed in the application object,
: but not switching of any current sessions.

The application will be restarted. You will lose application and session
variables. All you need to do is save global.asa (You don't need to make any
changes. Windows file change notification will tell IIS that global.asa has
been touched and IIS will restart the app).

Easy to test. Create a global.asa with any content you want (I just used a
comment). Create a test page with the following code:

<%
Application("Counter") = Application("Counter") + 1
Session("Counter") = Session("Counter") + 1

Response.Write(Application("Counter") & "<br>")
Response.Write(Session("Counter"))
%>

Hit the test page a few times and increment the counters. Now open
global.asa in notepad and save it (no need to make any changed). Now hit the
test page again. All your counters should have reset.

Cheers
Ken
 
K

Ken Schaefer

:
: :
.. So this is
: Windows File Change Notification will send message to IIS about the File
: Change and Application will restart.

That is correct. If you have any existing users on your site though, they
will lose their sessions.

Cheers
Ken
 
P

Prabhat

The application will be restarted. You will lose application and session
variables. All you need to do is save global.asa (You don't need to make any
changes. Windows file change notification will tell IIS that global.asa has
been touched and IIS will restart the app).

Easy to test. Create a global.asa with any content you want (I just used a
comment). Create a test page with the following code:

<%
Application("Counter") = Application("Counter") + 1
Session("Counter") = Session("Counter") + 1

Response.Write(Application("Counter") & "<br>")
Response.Write(Session("Counter"))
%>

Hit the test page a few times and increment the counters. Now open
global.asa in notepad and save it (no need to make any changed). Now hit the
test page again. All your counters should have reset.

Cheers
Ken
Hi Ken, Thanks for the Info. Then it is very easy when the website is
hosted with ISP and we donot have access to restart the Service. So this is
Windows File Change Notification will send message to IIS about the File
Change and Application will restart.

Thanks
Prabhat
 
P

Prabhat

Ken Schaefer said:
:
. So this is
: Windows File Change Notification will send message to IIS about the File
: Change and Application will restart.

That is correct. If you have any existing users on your site though, they
will lose their sessions.

Cheers
Ken
Hi Ken, Just tested the logic and it is working fine. And yes the Existing
users will lose their Sessions, So I need to deply the files only after the
Mid Night.

Thanks
Prabhat
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top