Author: Radu Alexandru | Posted on: 11/20/2008 10:02:27 AM | Views : 1200

I should save files on a LAN location through an asp.net 1.1 page. The web app. uses by default NETWORK SERVICE account which is not allowed to access that LAN, but my account domain/userid is can do it. Everything is ok when I impersonate the app using in web config <identity impersonate="true" userName="accountname" password="password" /> my credentials. But having in clear the pwd is not nice, so later I've tried to copy the file in LAN through a runtime impersonation using the code find under http://support.microsoft.com/kb/306158 - Impersonate a Specific User in Code, but doesn't work. Any idea? It looks like the problem is when the function LogonUserA(userName, domain, password, LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, token) fails returning returns code 1385.
Just to mention that I ...

Go to the complete details ...