Role based access to photos (jpeg files)?

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Role based access to photos (jpeg files)?

    I need to role based access to photo files stored on a Windows Server 2003
    based web server. The user should only be given access to certain files
    stored on the web server provided that some application logic grants access
    to the files (could be single files in a directory where multiple files are
    stored).

    How can this be done?

    Olav


    Olav Tollefsen Guest

  2. Similar Questions and Discussions

    1. Do I need Role Based Security
      Corinna, In your example i'd say its not necessary to use role-based security. Since there's only 1 level of membership as you say then all I...
    2. Role-Based Authorization
      I am using ASP.NET and Access as the database. I would like to use role-based authorization for the login page. Can anyone help me?
    3. Reg Role BAsed security..
      Hi All.. Can any body detail out the basic diff/advatages/disadvantage over acheiving the role based security and the same thing in case of...
    4. Role Based Solution - Help
      Hi I am trying to decide on the best way to implement a role based security solution for a dotNET website. I am keen to use the Identities,...
  3. #2

    Default RE: Role based access to photos (jpeg files)?

    Olav

    You can grant access to files on a file by file basis or by directory. In the web.config file, just outside of the <system.web> element, enter

    <location path="jpegFolderName"><system.web><authorization>< allow users="allowedUserName" /><deny users="?" /></authorization></system.web></location>
    David Coe Guest

  4. #3

    Default Re: Role based access to photos (jpeg files)?

    I can't do it statically as suggested below. I MUST be able make decisions
    in the code weather to allow access or not.

    Olav

    "David Coe" <dhc0e@aol.com> wrote in message
    news:5C3BE319-90B9-4414-BB9D-4341D990F821@microsoft.com...
    > Olav -
    >
    > You can grant access to files on a file by file basis or by directory. In
    the web.config file, just outside of the <system.web> element, enter:
    >
    > <location path="jpegFolderName"><system.web><authorization>< allow
    users="allowedUserName" /><deny users="?"
    /></authorization></system.web></location>


    Olav Tollefsen Guest

  5. #4

    Default Re: Role based access to photos (jpeg files)?

    Would you consider writing an HttpHandler to do this for you? It is easier
    than you might think to write some .NET code that returns images back to the
    browser and the ability to write code to authorize the request would seem to
    provide you with what you need.

    The big decision then would be whether you would use the .ashx extension for
    your handler as it typical of custom handlers or if you would remap the IIS
    metabase to point .jpg files to .NET and write a custom handler for .jpg
    files. Either way would work. It depends more on how the URL needs to look
    to the consumer. The .ashx is easier to deploy since it doesn't require
    changing the IIS metabase.

    Joe K.

    "Olav Tollefsen" <x@y.com> wrote in message
    news:%230MRBF97DHA.3704@tk2msftngp13.phx.gbl...
    > I can't do it statically as suggested below. I MUST be able make decisions
    > in the code weather to allow access or not.
    >
    > Olav
    >
    > "David Coe" <dhc0e@aol.com> wrote in message
    > news:5C3BE319-90B9-4414-BB9D-4341D990F821@microsoft.com...
    > > Olav -
    > >
    > > You can grant access to files on a file by file basis or by directory.
    In
    > the web.config file, just outside of the <system.web> element, enter:
    > >
    > > <location path="jpegFolderName"><system.web><authorization>< allow
    > users="allowedUserName" /><deny users="?"
    > /></authorization></system.web></location>
    >
    >

    Joe Kaplan \(MVP - ADSI\) Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139