authenticating access to files from ASP.NET

Discussion in 'ASP .Net Security' started by John Challis, Jul 6, 2005.

  1. John Challis

    John Challis Guest

    I want to restrict access to files (on local and remote servers) without
    requiring users to log in to my ASP.NET application. The users are on an
    intranet, anonymous access is disabled and Integrated Windows Authentication
    is enabled.

    Now, how can we determine if the current authenticated user has access to
    specific local and remote files on other Windows servers within the domain?

    Please note, we do not wish to restrict access to web pages - but to any file.

    Thanks in advance.
     
    John Challis, Jul 6, 2005
    #1
    1. Advertising

  2. The right way to do this is to impersonate the user and try to access the
    file. It will throw an exception if you can't access it.

    For the remote files on a file share, you'll also need Kerberos delegation
    to make that work as that involves an extra machine hop and that is only
    supported with delegation.

    If you want a friendly way to check in advance if the user will have access
    to the file before attempting to open it (or list it), then you probably
    need to look at doing p/invoke and using the security APIs like AccessCheck.

    Joe K.

    "John Challis" <John > wrote in message
    news:...
    >I want to restrict access to files (on local and remote servers) without
    > requiring users to log in to my ASP.NET application. The users are on an
    > intranet, anonymous access is disabled and Integrated Windows
    > Authentication
    > is enabled.
    >
    > Now, how can we determine if the current authenticated user has access to
    > specific local and remote files on other Windows servers within the
    > domain?
    >
    > Please note, we do not wish to restrict access to web pages - but to any
    > file.
    >
    > Thanks in advance.
     
    Joe Kaplan \(MVP - ADSI\), Jul 6, 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. mrwoopey
    Replies:
    3
    Views:
    9,577
    mrwoopey
    Jun 30, 2003
  2. jm
    Replies:
    3
    Views:
    345
  3. Larry Rekow
    Replies:
    1
    Views:
    515
    Hermit Dave
    Aug 31, 2004
  4. Replies:
    1
    Views:
    526
    Patrick Olurotimi Ige
    Mar 29, 2005
  5. bernadou

    asp.net login control not authenticating?

    bernadou, Jan 3, 2006, in forum: ASP .Net Security
    Replies:
    13
    Views:
    774
    Will Smith
    Feb 9, 2006
Loading...

Share This Page