To grant access to a protected directory use " impersonate" or " LogonUser"?

Discussion in 'ASP .Net Security' started by Johannes Hammersen, Jun 10, 2005.

  1. Hi there,

    I have a page that needs to grant the user access to a protected sub dir, if
    a certain condition is true. The Sub dir is protected through windows
    security. So I need to change the users account to one that has permission
    to that folder. By searching the web I found " impersonate" and "
    LogonUser". I can't figure out which one I would need to use. I can't
    display a login screen to the webuser, because he does not know the account
    I'm having to use to login.

    Thanks for any help.
    Johannes
     
    Johannes Hammersen, Jun 10, 2005
    #1
    1. Advertising

  2. Johannes Hammersen

    Dave F. Guest

    Johannes,

    I think you need to use impersonate. You need to create a user account and
    give it the required permissions the that folder.

    Here is some good information on just how to get the job done.
    http://www.codeproject.com/aspnet/Sec_Run_ASPNET_WP.asp


    "Johannes Hammersen" <> wrote in message
    news:%...
    > Hi there,
    >
    > I have a page that needs to grant the user access to a protected sub dir,
    > if a certain condition is true. The Sub dir is protected through windows
    > security. So I need to change the users account to one that has permission
    > to that folder. By searching the web I found " impersonate" and "
    > LogonUser". I can't figure out which one I would need to use. I can't
    > display a login screen to the webuser, because he does not know the
    > account I'm having to use to login.
    >
    > Thanks for any help.
    > Johannes
    >
     
    Dave F., Jun 12, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. harry
    Replies:
    1
    Views:
    463
    Scott Allen
    Feb 1, 2005
  2. frekster
    Replies:
    3
    Views:
    4,647
    frekster
    Sep 26, 2005
  3. Bill Belliveau

    DirectoryEntry Impersonate or WindowsIdentity Impersonate?

    Bill Belliveau, Jan 28, 2004, in forum: ASP .Net Security
    Replies:
    3
    Views:
    391
    Joe Kaplan \(MVP - ADSI\)
    Jan 31, 2004
  4. Lee

    LogonUser access denied

    Lee, Aug 16, 2006, in forum: ASP .Net Security
    Replies:
    9
    Views:
    620
  5. Dominick Baier

    LogonUser Access Denied

    Dominick Baier, Oct 10, 2006, in forum: ASP .Net Security
    Replies:
    2
    Views:
    233
    Bill Alexander
    Oct 10, 2006
Loading...

Share This Page