Impersonation in ASP.NET 2.0 (works from XP, not 2003)
- From: "Adam Clauss" <cabadam@xxxxxxxx>
- Date: Wed, 22 Mar 2006 08:37:51 -0600
We have a C# webapp which we recently upgraded from .NET 1.1 to .NET 2.0.
We need to access remote fileshares from our app, so we enabled
impersonation in the web.config file by doing:
<identity impersonate="true" userName="NT AUTHORITY\NetworkService"/>
While redundant on Windows 2003 since ASP.NET actually runs as
NetworkService already, it is required on Windows XP for the app to function
properly.
Since updating to .NET 2.0, having this line in the config file gives an
error when loading the webapp from a Windows 2003 web server:
"Could not create Windows user token from the credentails specified in the
config file. Error from the operating system 'Access is denied.'"
This works fine under Windows XP, and worked fine under both XP and Windows
2003 in .NET 1.1.
What changed that broke this in .NET 2.0 and Windows 2003?
Thanks!
--
Adam Clauss
.
- Follow-Ups:
- Re: Impersonation in ASP.NET 2.0 (works from XP, not 2003)
- From: Dominick Baier [DevelopMentor]
- Re: Impersonation in ASP.NET 2.0 (works from XP, not 2003)
- Prev by Date: Re: Custom RoleProvider question -- saving roles
- Next by Date: Re: Custom RoleProvider question -- saving roles
- Previous by thread: ADAM and AuthorizationStoreRoleProvider
- Next by thread: Re: Impersonation in ASP.NET 2.0 (works from XP, not 2003)
- Index(es):
Relevant Pages
|