Author: sp_412000@yahoo.com | Posted on: 11/17/2010 4:45:23 PM | Views : 922

My understanding was that if asp.net application wants to write file to file server, it needs to use impersonation. I use the http://support.microsoft.com/kb/306158#4  "Impersonate a Specific User in Code" to do it. But it didn't work. The GetLastError() was giving error code 1326 "Logon failure: unknown user name or bad password." ( as per http://msdn.microsoft.com/en-us/library/ms681385) Then, the only way it worked was I've to create user (My computer > manage > local user and groups > user) with same user name and password as the file server folder. Now, even if I removed the impersonation code, it still works. So, I'm confused. Why do we need impersonation? I'm using XP and wi ...

Go to the complete details ...