Impersonation in ASP.NET 2.0 (works from XP, not 2003)



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



.



Relevant Pages

  • Re: Windows.. its like coming home!
    ... gradual transition, especially in going from OS 9 to OS X. ... They needed something that could compete with Windows, ... mean by the "2 of every app" comment before - Apple took whatever apps ... I've found that because the Dock shows applications rather than windows, ...
    (comp.sys.mac.advocacy)
  • Re: Windows.. its like coming home!
    ... gradual transition, especially in going from OS 9 to OS X. ... They needed something that could compete with Windows, ... mean by the "2 of every app" comment before - Apple took whatever apps ... I've found that because the Dock shows applications rather than windows, ...
    (comp.sys.mac.advocacy)
  • RE: Beginners Questions
    ... We do use Windows form on the presentation layer which is on ... terminal server and call web services on the business logic side. ... of using "proxy" authentication on SQL Server. ... > I have written an app with a Windows Forms UI that is deployed to clients ...
    (microsoft.public.dotnet.distributed_apps)
  • Re: Frustration level with Windows -- ARG!
    ... I can have an app sieze and you can go take a ten ... That is MS-Outlook, not Windows. ... to the processes tab, not the applications tab. ... and it tries to stop them "gently" if it can, before resorting to kill -9. ...
    (comp.sys.mac.advocacy)
  • Re: DOS applications ?
    ... A DOS batch file runs dos programs sequentially and can run ... command prompt window and keep the second command ... Windows APIs to do it. ... A 16-bit DOS app running on pure MS-DOS cannot launch another app ...
    (microsoft.public.vc.mfc)