Forms Authentication for particular folder

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

  1. #1

    Default 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 particual
    folder: "/login".

    Usernames and passwords are stored in a tabel on SQL Server.
    The loginpage and Web.config are in the root of the web.

    I've tried several things but I don't get it work correctly.
    My code of checking against the table works correctly, I'm struggling with
    Web.config.

    The authentication section of Web.config is like:

    <authentication mode="Forms">
    <forms name="justaname"
    path="/"
    loginUrl="login.aspx"
    protection="All"
    timeout="20">
    </forms>
    </authentication>

    All I want to manage is to allow anonymous acces for the whole website,
    except the content of the subfolder "/login".
    Any help is appreciated, thanks!

    VicWare
    Email: info@vicREMOVE-MEware (spamblock)


    VIC 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. ASP.Net Forms authentication with basic authentication popup
      Relatively new to ASP.Net but have a strange problem. My site uses forms authentication for a large administration section however after the user...
    3. Forms authentication then redirection to a secure web with NT authentication?
      Hi, I want to allow access to particular secured intranet web sites. These intranet are stored in sharepoint (2003 version) Actually I've...
    4. Authentication ticket, cookieless, forms authentication?
      Hi. I want to use Forms Authentication, cookieless. The issue is setting the Authentication Ticket without using cookies (!) That is, the...
    5. 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...
  3. #2

    Default Re: Forms Authentication for particular folder

    You need to create a new <location> in your web.config and point it to your
    folder. Configure forms auth for that location only

    Cheers
    Ken


    "VIC" <nomail@nomail.com> wrote in message
    news:40dfc41b$0$10303$756600cd@news.cambrium.nl...
    : 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 particual
    : folder: "/login".
    :
    : Usernames and passwords are stored in a tabel on SQL Server.
    : The loginpage and Web.config are in the root of the web.
    :
    : I've tried several things but I don't get it work correctly.
    : My code of checking against the table works correctly, I'm struggling with
    : Web.config.
    :
    : The authentication section of Web.config is like:
    :
    : <authentication mode="Forms">
    : <forms name="justaname"
    : path="/"
    : loginUrl="login.aspx"
    : protection="All"
    : timeout="20">
    : </forms>
    : </authentication>
    :
    : All I want to manage is to allow anonymous acces for the whole website,
    : except the content of the subfolder "/login".
    : Any help is appreciated, thanks!
    :
    : VicWare
    : Email: info@vicREMOVE-MEware (spamblock)
    :
    :


    Ken Schaefer Guest

  4. #3

    Default RE: Forms Authentication for particular folder

    Dear VIC,

    You need to add the following code to your web.config file.

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

    Hope it helps.

    Thanks.


    "VIC" wrote:
    > 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 particual
    > folder: "/login".
    >
    > Usernames and passwords are stored in a tabel on SQL Server.
    > The loginpage and Web.config are in the root of the web.
    >
    > I've tried several things but I don't get it work correctly.
    > My code of checking against the table works correctly, I'm struggling with
    > Web.config.
    >
    > The authentication section of Web.config is like:
    >
    > <authentication mode="Forms">
    > <forms name="justaname"
    > path="/"
    > loginUrl="login.aspx"
    > protection="All"
    > timeout="20">
    > </forms>
    > </authentication>
    >
    > All I want to manage is to allow anonymous acces for the whole website,
    > except the content of the subfolder "/login".
    > Any help is appreciated, thanks!
    >
    > VicWare
    > Email: info@vicREMOVE-MEware (spamblock)
    >
    >
    >
    ranganh Guest

  5. #4

    Default Re: Forms Authentication for particular folder

    That works!
    Thanks a lot!

    Vic

    "VIC" <nomail@nomail.com> schreef in bericht
    news:40dfc41b$0$10303$756600cd@news.cambrium.nl...
    > 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 particual
    > folder: "/login".
    >
    > Usernames and passwords are stored in a tabel on SQL Server.
    > The loginpage and Web.config are in the root of the web.
    >
    > I've tried several things but I don't get it work correctly.
    > My code of checking against the table works correctly, I'm struggling with
    > Web.config.
    >
    > The authentication section of Web.config is like:
    >
    > <authentication mode="Forms">
    > <forms name="justaname"
    > path="/"
    > loginUrl="login.aspx"
    > protection="All"
    > timeout="20">
    > </forms>
    > </authentication>
    >
    > All I want to manage is to allow anonymous acces for the whole website,
    > except the content of the subfolder "/login".
    > Any help is appreciated, thanks!
    >
    > VicWare
    > Email: info@vicREMOVE-MEware (spamblock)
    >
    >

    VicWare 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