File Download?

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top