Application_Start fires when the first user hits your Web site, and
Application_End fires when the last user in the site's session times out.
The Application object exists in the server's memory until the web
server(not website) stops or until you modify or refresh the global.asax
file. You may right click the machine name in the MMC, and select "Restart
IIS" to make the webserver restart.
You may check the following article for more information.
Hope this helps.
This posting is provided "AS IS" with no warranties, and confers no rights.
| From: "Morten Overgaard" <movoticon.dk>
| Subject: Application_Start event does not fire on restart of IIS?
| Date: Mon, 25 Aug 2003 10:53:29 +0200
| Lines: 19
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <e8#ToZuaDHA.880TK2MSFTNGP09.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet.webservic es
| NNTP-Posting-Host: 220.127.116.11
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP09.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
| Hi Sirs.
| We are facing weird problems using a web service written in C#.
| When the web service application is started we have some startup code in
| Application_Start event in the Global.asax file.
| The first time it behaves as expected - but when I restart ( Stop then
| Start) the Webserver ( through MMC ) in which this webservice is running I
| expect the Application_Start event to fire again but it doesn't??? The
| way I can get the Application_start to fire again is to kill the
| aspnet_wp.exe proces ( it starts it self again ).
| The problem is that I need to read a file on start up of the application -
| and I thought that a "Stop then Start" of the webserver would make the
| Application_Start event happen again - but obviously it doesn't. Anybody
| knows how to solve this??
| Regards Morten