Reputation: 2591
I am trying to track down some issue where users will randomly get prompted by IIS 7.5 for their security credentials. I have come across something in the Event Viewer that says
A worker process with process id of 'xxxx' serving application pool 'MyAppPoolName' was shutdown due to inactivity. Application Pool timeout configuration was set to 20 minutes. A new worker process will be started when needed.
So let's say that happens, and then a user comes in and hits the site. A new worker process gets started. Could this cause a prompt for credentials from IIS? I am using Windows Authentication with IIS.
Upvotes: 4
Views: 2450
Reputation: 15155
The application pool will recycle after a configured amount of inactivity. If your session timeout is larger than the IIS recycle time then you are at the risk of losing sessions if you are using in-process session state. Normally, IIS will attempt to hang onto sessions created prior to a recycle and process new requests using the new thread pool.
Configuring the application to use the ASP.NET State Service or sql server to hold session state will allow the sessions' to be maintained during recycle. However, the initial request after the recycle event that you are seeing in your log will take a startup penalty.
I would configure the session timeout to be less than the recycle period in IIS, however in a properly configured application the user would be re-directed to login in either case. You might want to consider using sticky sessions.
Upvotes: 3