A
Andy
Hello,
a great problem for me is to download a file by other
account than the logon user. I change the identity ->
int usertoken;
bool LoginOK = LogonUser
("user", "", "pwd", 3, 0, out usertoken);
if(LoginOK)
{
Session["usertoken"] =
usertoken;
}
WindowsIdentity
ImpersonationIdentity = new WindowsIdentity((IntPtr)
usertoken);
WindowsImpersonationContext
ImpersonationContext = ImpersonationIdentity.Impersonate();
WindowsIdentity Identity =
WindowsIdentity.GetCurrent();
This account have access to the folder and can only upload
a file ;-(
Can anyone help me??
Thanks a lot and best regards
Andy
a great problem for me is to download a file by other
account than the logon user. I change the identity ->
int usertoken;
bool LoginOK = LogonUser
("user", "", "pwd", 3, 0, out usertoken);
if(LoginOK)
{
Session["usertoken"] =
usertoken;
}
WindowsIdentity
ImpersonationIdentity = new WindowsIdentity((IntPtr)
usertoken);
WindowsImpersonationContext
ImpersonationContext = ImpersonationIdentity.Impersonate();
WindowsIdentity Identity =
WindowsIdentity.GetCurrent();
This account have access to the folder and can only upload
a file ;-(
Can anyone help me??
Thanks a lot and best regards
Andy