File Download?
From: Andy (anonymous_at_discussions.microsoft.com)
Date: 08/17/04
- Previous message: Joe Kaplan \(MVP - ADSI\): "Re: Accessing another domain file system in C#"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 17 Aug 2004 05:14:40 -0700
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
- Previous message: Joe Kaplan \(MVP - ADSI\): "Re: Accessing another domain file system in C#"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|