0

I am trying to debug an issue I am having with an asp.net web application running on IIS 7.5. I was expecting to find that when we deployed our application by changing the physical path to a new copy of the code, requests were not being completed.

I was under the impression that currently executing requests would finish on the old instance of the app while new requests were executed against the new instance. If that is true, I expected the old instance to run until httpRuntime.shutdownTimeout was reached.

To make a long story short, I tried to reproduce this locally and it didn't happen. No matter how long I made my request take IIS seems like it will wait beyond the setting in shutdownTimeout.

This is the part of the life cycle I am interested in. What happens between a change to the physical path of the application and IIS pulling the plug on any currently executing requests?

Russell Clarvoe
  • 483
  • 4
  • 11
  • Let visual studio deploy your code for you. I have no idea why you think POSTS / GETS (request) would be shared across instances. I would look for any hard-coded paths in the application, if visual studio puts a squiggly under the path, it's worth investigating. I don't think app_start, app_end have anything to do with your problem if I'm understanding correctly. In fact, it's very rare you even have to use those. – RandomUs1r Mar 18 '13 at 22:44
  • 2
    Duplicate of [ASP.NET page life cycle explanation](https://stackoverflow.com/questions/8457297/asp-net-page-life-cycle-explanation) – TylerH Aug 19 '20 at 21:36

1 Answers1

0

There is a very thorough explanation of ASP.NET Application lifecycle on MSDN.

The Application_Start and Application_End methods are special methods that do not represent HttpApplication events. ASP.NET calls them once for the lifetime of the application domain, not for each HttpApplication instance.

Application_Start

Called when the first resource (such as a page) in an ASP.NET application is requested. The Application_Start method is called only one time during the life cycle of an application. You can use this method to perform startup tasks such as loading data into the cache and initializing static values. You should set only static data during application start. Do not set any instance data because it will be available only to the first instance of the HttpApplication class that is created.

Community
  • 1
  • 1
Alexander Tsvetkov
  • 1,649
  • 14
  • 24