.net - How to Cause an HttpModule to be Invoked Before the First Request? -
I have several applications that I'm deploying in the .NET / IIS environment. For these applications, I have registered the implementation of IHttpModule in the system.web / httpModules section of web.config. In the implementation of I IHttpModule, I have an Init () method that starts some daemon thread and starts logging The application has started.
My problem is that Init () is not called up to the first HTTP request, it comes in. Is there a way to force the system to move forward and execute its modules rather than wait for HTTP requests first?
If you are on IIS 7, you can use the IIS application warm-up module to make sure Your application is always running:
Check the application pool settings too, so it is not being shut down and is being restarted whenever there is no activity at all.
Otherwise I would advise you to create an NT service and put your daemon threads there.
Comments
Post a Comment