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.

RE: IIS & ASP & SQL && User Accounts by wjzhang

wjzhang
Tue May 02 04:08:48 CDT 2006

Hi,

"Data stored on a UNC, specified username1 to access data."

I wonder which kind of data is stored on the UNC path? Are they just some
ASP.net pages and you specify username1 as the Connect As account in IIS?

Best regards,

WenJun Zhang
Microsoft Online Partner Support

This posting is provided "AS IS" with no warranties, and confers no rights.




Re: IIS & ASP & SQL && User Accounts by Tom

Tom
Tue May 02 11:08:23 CDT 2006

"Brooster" <brooster@news.postalias> wrote in message
news:u1gwLIWbGHA.1260@TK2MSFTNGP05.phx.gbl...
> 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.

Sounds like a delegation issue in that IIS is unable to pass the credentials
to the SQL server. This is a known problem with Windows/NTLM
authentication. Can you enable Kerberos? It sounds like that might help.

http://support.microsoft.com/?id=319723
http://support.microsoft.com/default.aspx?scid=kb;en-us;817384&Product=sql2k
http://support.microsoft.com/kb/247931/en-us

--
Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserver2003/community/centers/iis/
http://mvp.support.microsoft.com/
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS