Running Windows 2003 x64, w/ASP .Net 2.0 x64
IIS:
Data stored on a UNC, specified username1 to access data.
Application Pool specified to use username2 to run the process via the Identity Tab.
Folder converted to application and using Application Pool configured using username2.
Username1 has no access to SQL
Username2 has sql access (windows account) including SQL Session State
Loading page gets error
System.Web.HttpException: Failed to login to session state SQL server for user domain\username1
If we change the content to not be on a UNC and stored locally, we have no issue.
web.config has
<identity impersonate="false" />
<sessionState mode="SQLServer" sqlConnectionString="server=sqlserver.my.domain,1433;Trusted_Connection=true" timeout="60" cookieless="false" stateNetworkTimeout="10"></sessionState>
username1 has the permissions: ?Impersonate a client after authentication? and "Log on as a batch job"
username2 is a member of the IIS_WPG which has the permission "Log on as a batch job" ?Impersonate a client after authentication?
There are no failed errors in the Security event log
In the application log is the following warning:
Event Type: Warning
Event Source: ASP.NET 2.0.50727.0
Event Category: Web Event
Event ID: 1309
Date: 4/28/2006
Time: 10:47:08 AM
User: N/A
Computer: COMPUTER1
Description:
Event code: 3005 Event message: An unhandled exception has occurred. Event time: 4/28/2006 10:47:08 AM Event time (UTC): 4/28/2006 4:47:08 PM Event ID: e00a9d8d40a24a40aef9ab0047104433 Event sequence: 2 Event occurrence: 1 Event detail code: 0 Application information: Application domain: /LM/W3SVC/700724/Root/jobeval-1-127907164266661470 Trust level: Full Application Virtual Path: /jobeval Application Path: \\computer2\web$\dev\jobeval\ Machine name: Computer1 Process information: Process ID: 2296 Process name: w3wp.exe Account name: domain\username2 Exception information: Exception type: HttpException Exception message: Failed to login to session state SQL server for user ?domain\username1?. Request information: Request URL: http://site.domain/jobeval/login.aspx?ReturnUrl=/jobeval/index.aspx Request path: /jobeval/login.aspx User host address: computer1.ip.address User: Is authenticated: False Authentication Type: Thread account name: domain\username1 Thread information: Thread ID: 1 Thread account name: domain\username1 Is impersonating: False Stack trace:
Custom event details:
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.