Check permission on files and directories

Discussion in 'ASP .Net' started by Jonas Nilsson, Aug 13, 2003.

  1. Hi!

    I need to check if the current user has READ access on a file or a
    directory.

    Is there a way to do this in C#?, without using try & catch.

    /Jonas
     
    Jonas Nilsson, Aug 13, 2003
    #1
    1. Advertising

  2. Jonas Nilsson

    Mike Hanson Guest

    Take a look at the FileIOPermission class. You need to
    use Imperative Code Access Security.

    Mike Hanson
    MCSE, MCSD, MCDBA, MCT

    >-----Original Message-----
    >Hi!
    >
    >I need to check if the current user has READ access on a

    file or a
    >directory.
    >
    >Is there a way to do this in C#?, without using try &

    catch.
    >
    >/Jonas
    >
    >
    >.
    >
     
    Mike Hanson, Aug 13, 2003
    #2
    1. Advertising

  3. I can't find out how to get a specific permission for a file,

    /Jonas

    "Mike Hanson" <> wrote in message
    news:0b1d01c3616d$b7f34990$...
    > Take a look at the FileIOPermission class. You need to
    > use Imperative Code Access Security.
    >
    > Mike Hanson
    > MCSE, MCSD, MCDBA, MCT
    >
    > >-----Original Message-----
    > >Hi!
    > >
    > >I need to check if the current user has READ access on a

    > file or a
    > >directory.
    > >
    > >Is there a way to do this in C#?, without using try &

    > catch.
    > >
    > >/Jonas
    > >
    > >
    > >.
    > >
     
    Jonas Nilsson, Aug 13, 2003
    #3
    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. Joel Finkel
    Replies:
    0
    Views:
    511
    Joel Finkel
    Sep 12, 2003
  2. Jeffry van de Vuurst
    Replies:
    2
    Views:
    552
    Jeffry van de Vuurst
    Jul 30, 2003
  3. =?Utf-8?B?TGFzc2UgTmlsc3Nvbg==?=

    Multiple bin-directories with virtual directories?

    =?Utf-8?B?TGFzc2UgTmlsc3Nvbg==?=, Nov 9, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    845
    =?Utf-8?B?TGFzc2UgTmlsc3Nvbg==?=
    Nov 9, 2004
  4. Adam Petrie
    Replies:
    8
    Views:
    338
    Adam Petrie
    Oct 11, 2004
  5. Ron Smith
    Replies:
    5
    Views:
    167
    Michele Dondi
    Nov 2, 2004
Loading...

Share This Page