In IIS, an Application runs within an Application Pool. An Application Pool runs in one or more W3WP processes.
It sounds like what's happening here is that your app eventually encounters a condition that the W3WP can't cope with when run with minimal privileges.
LocalSystem is a high-privileged account - when stuff starts (or in your case, keeps) working as LocalSystem, typically that indicates some form of privilege level difference (occasionally, user profile differences).
All App Pool Identities are magically given membership to IIS_IUSRS by default, which grants all the permissions IIS requires to run an App Pool - this may not include all the permissions required by your particular app/framework/one of the libraries.
Try enabling the Load User Profile setting in the app pool when running low-privileged, and if that doesn't improve things, you'll need to debug it - either watch it running with Process Monitor for possible file or registry access difficulties (http://live.sysinternals.com/procmon.exe), or grab a memory dump of the process when it's failed, grab PSSCOR2, and perhaps start with !dae if nothing looks particularly odd at that point.
The short version is that the internal process / runtime state sounds like it's getting lunched; it shouldn't; often it's going to be some sort of native code issue that does that, but in your case, it could be permissions.
Edit: Oh, not LocalSystem, {local system user like administrator}. Gotcha. Well, give the Profile thing a try - see also this bit.
Also, Recycling: when a new W3WP is started to replace the old one, losing all the state from the old one in the process, and the old one is killed off after 90 seconds if it doesn't complete any useful work it's still capable of, and shut itself down. (read "by default")
IIS 7/7.5 has a new "feature" - Role Services. The post from rsbarro reminded me that there is one role service that is responsible for static content. It's Web Server/Common HTTP Features/Static Content. Check if MIME Types icon is present in IIS Manager, as rsbarro suggested.
You need to install the Static Content role service if it does not.
To do that, select the:
- Server Manager
- Roles
- Web Server (IIS) node from the left pane
- scroll to Role Services window
- see if the Static Content role service is installed.
From what you describe, this seems to be your problem.
In general, if IIS7 doesn't do something that IIS6 did, the first thing to check is to see if the correspondent role service is installed. Hope this helps.
Best Answer
First, check the Event Viewer and see the cause of the Recycle.
Second, I recommend changing the Recycle time to a specific time each day - that will allow you to control when the application pool recycles. Maybe configure this to a "quite" time.
Lastly, check the "Advanced Settings" in your Application Pool, there is a setting for "Idle Time-out (minutes). By default it's set to 20, that means that if there are not requests to that application pool, it will stop, and upon first request - restart again. Change it to 0 to always keep it on.