File Download?
From: Andy (anonymous_at_discussions.microsoft.com)
Date: 08/17/04
- Next message: MattC: "Re: Design pattern for preventing the assignment of duplicate login id's"
- Previous message: Daren Hawes: "Forms Authentication using Folders"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 17 Aug 2004 05:08:32 -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
- Next message: MattC: "Re: Design pattern for preventing the assignment of duplicate login id's"
- Previous message: Daren Hawes: "Forms Authentication using Folders"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|