Hi guys,
I'm currently developing a web application that will need to be able to manage network resources. However, I am running into some weird problems.
I have enabled Windows authentication and impersonation, and System.Security.Principal.WindowsIdentity.GetCurrent().Name returns my actual user, so the impersonation and authentication seem to be working fine.
However, if I try to copy a file as a test:
System.IO.File.Copy("\\fileserver\path\to\file.doc", "C:\test.doc")
I keep getting shown a login prompt
When I change my impersonation line in web.config from <identity impersonate="true" /> to <identity impersonate="true" userName="DOMAIN\user" password="password" /> (using the exact same account that was previously logged in), the file is copied without any problem...
What might be preventing it from working without setting the fixed account to impersonate access? ...
Go to the complete details ...