Protected folder with forms authentication

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

  1. #1

    Default Protected folder with forms authentication

    i have a VB.NET ASP.NET application. the front end is working fine, and know
    im developing the manager options. this options have to be in a subfolder
    server.com/manager.
    how do i protect only that subfolder and its sub-sub-folders?
    i thought setting the path param in the authentication - forms section of
    web.config to path="/manager" will work.... but its not working.
    everything works ok when i set the path to "/", so there is no problem with
    the code... but i protect the whole site...
    any help?


    Harley Guest

  2. Similar Questions and Discussions

    1. Applying security at folder level using forms authentication
      Hi I have two folders in the .net application,one can be accessed by everyone adn the other needs to be accessed only through submitting login and...
    2. Forms Authentication for particular folder
      Hi, I'm working on a webapplication, most part is for anonymous access, but for one part login is needed. All the files after login are in one...
    3. PDF search within a password protected folder
      Hello: Do you know of any search engines that can search for text in PDF documents when the PDFs are located in a password-protected folder...
    4. Protected folder login details
      Hi, I have a folder that is protected, the users login with their unique username and password, these are held in a text file. Is this...
    5. Password Protected Forms
      Hi, Well if you want something simple you could just follow this method in the KB article: http://support.microsoft.com/?id=209871 Not...
  3. #2

    Default Re: Protected folder with forms authentication

    First,In the <system.web> section of the main application folder's
    web.config file specify authorization to allow access to the main folder.

    <authorization>
    <allow users="*" />
    </authorization>

    Now all users, despite are they authenticated or not, can access the main
    folder(could be <allow users="?" /> as well)

    Second: Outside the web.config file's <system.web> element but inside
    <configuration> element, create a <location> tag that matches the subfolder.
    i.e this can be set in the main web.config file.

    <location path="manager">
    <system.web>
    <authorization>
    <deny users="?" />
    </athorization>
    </system.web>
    </location>

    This should prevent unauthenticated users from accessing the subfolder. You
    can again refine this for pages in the subfolder, if such is needed, with
    the relevant syntax for the path attribute say:
    path="manager/specificpage.aspx" and so on.

    Hope this helps.

    --
    Teemu Keiski
    MCP, Designer/Developer
    Mansoft tietotekniikka Oy
    [url]http://www.mansoft.fi[/url]

    AspInsiders Member, [url]www.aspinsiders.com[/url]
    ASP.NET Forums Moderator, [url]www.asp.net[/url]
    AspAlliance Columnist, [url]www.aspalliance.com[/url]




    "Harley" <harleyobrien%40hotmail.com> wrote in message
    news:e0XSdo9UDHA.656@tk2msftngp13.phx.gbl...
    > i have a VB.NET ASP.NET application. the front end is working fine, and
    know
    > im developing the manager options. this options have to be in a subfolder
    > server.com/manager.
    > how do i protect only that subfolder and its sub-sub-folders?
    > i thought setting the path param in the authentication - forms section of
    > web.config to path="/manager" will work.... but its not working.
    > everything works ok when i set the path to "/", so there is no problem
    with
    > the code... but i protect the whole site...
    > any help?
    >
    >

    Teemu Keiski 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