File Download?

From: Andy (anonymous_at_discussions.microsoft.com)
Date: 08/17/04

  • Next message: mifko: "UserControl inside IE can't connect to MSSQL"
    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


  • Next message: mifko: "UserControl inside IE can't connect to MSSQL"

    Relevant Pages

    • File Download?
      ... a great problem for me is to download a file by other ... account than the logon user. ... ImpersonationIdentity = new WindowsIdentity ... This account have access to the folder and can only upload ...
      (microsoft.public.dotnet.framework.aspnet.security)
    • Re: Spyware possible being on one account and not the other
      ... > the browser in the guest account is jacked to some site. ... using Windows XP "prettifications". ... If you want to know when one of your applications is trying to obtain ... are pay - some you can only download if you are registered - but it is best ...
      (microsoft.public.windowsxp.security_admin)
    • Re: "My Computer" system folder freezes
      ... > 2, I have created a new account, and that account does not have the> problem with the "my computer" system folder crashing. ... check your device manufacturers websites for the latest drivers. ... If your system is clear of viruses, open Control Panel, open System, go ... If you do not have an XP CD, you can download this application ...
      (microsoft.public.windowsxp.basics)
    • Re: Update still failing with 80240020 and 8024000c
      ... my download subdir contains those too. ... I was thinking it would represent a failed install, ... account and the authority it has you might even have some success ... simply running one of those "executables" under your own account ...
      (microsoft.public.windowsupdate)
    • Re: Download Stopping
      ... Since the router and ISP were the only common factors I ... possible to delete attachments to save space on the mail database. ... When using detach from a webmail account it seems ... problem may not be email specific, but download related instead. ...
      (microsoft.public.internet.mail)