jmitchell wroteShawn,
The part you are missing is that the Website is configured to impersonate. This is common in shared hosting scenarios to sandbox each website. The configured identity for the AppPool should not be the identity that the app is running under because that identity is shared by many websites.
As stated earlier in the thread, apparently during startup the app has not switched to the impersonated user yet, and since the AppPool identity does not have permission in the website this error occurs.
It seems like an issue for Microsoft, but maybe they don't have any choice but to wait till later in the application lifecyle to switch to the impersonated user since this is probably when the Worker Process is being spun up.
If that is the case then how is the following a possible workaround
jmitchell wrote
Another option is to give the configured app pool identity special permission of only "delete" for the EventQueue folder.
If this is a workaround, then making sure the app pool identity has the same permissions as NetworkServices account is the fix for the issue. The only reason you have to give the NetworkServices account List, Read, Execute, Write, Modify under Win2003 is becuase that it the identity the AppPool uses by default (instead of ASP.Net). If you change this user then whatever you change this user to has to have the same permissions as the NetworkServices identity. This also means that if this is changed when impersonation is used, then the impersonation account would also have to have the same permissions as the NetworkServices has.
Just so I understand this better.
Default IIS setup
AppPool: NetworkServices
WebSite: IUSR_.......
So in the scenerio that is causing the problem are these the same as above, or is one or both of them setup to be a different identities? If so, which ones. I am assuming the user being impersonated is the Website user, is that correct? So based on the previous post if you use impersonation, then the appPool user is not used and the impersonated identity it used to run the web site and appPool?