Why would the Application_Start method being called a lot on my ASP.NET web service?

497 views Asked by At

I have an ASP.NET Web Service (SOAP style) that is running in our production environment.

Our server guys have set things up such that things like starting and stopping of Windows services, etc., are sent via email to the appropriate parties.

Lately my boss has been getting emails about my ASP.NET web service:

The (My Web Service's Name) Application_Start method was called

Now I figure that what's happening here is that the service has gone so long since being called last that the server has unloaded it from memory and now it's being re-loaded again (the product that consumes this web service has declined in popularity, so this isn't too far fetched a theory).

However my boss tells me he's been getting this email "dozens" of times per day.

I suppose it's still possible that my theory above is accurate, especially given how it's spread out over 3-4 servers in our web tier, but is there any other explanation for why this might be happening so frequently?

At this point in time I don't know whether or not Application_End calls are being similarly emailed or not, or what the ratio is.

1

There are 1 answers

0
Gonzalo On

The application could be downloaded when some of the settings in <processModel> are exceeded. idleTimeout could be the one in your case, but also requestLimit and memoryLimit.

Also, and this is based on a true story, if you start any thread, run anything in a separate threadpool thread, or use the TPL, make sure that you catch any exception that might be thrown. Uncaught exceptions from those threads will kill the worker process. Check the application logs in the Windows event log. If this is the case, you should see the red icon application error signs around the same time that the emails go out.