p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 1.0 and 1.1 Professional (http://p2p.wrox.com/forumdisplay.php?f=57)
-   -   impersonation through web.config and runtime (http://p2p.wrox.com/showthread.php?t=71542)

xile November 20th, 2008 12:09 PM

impersonation through web.config and runtime
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 cannot see and modify settings on the web server due to corporate security policy.

All times are GMT -4. The time now is 10:26 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.