Forms Authentication Question

Discussion in 'ASP .Net Security' started by Rob, Nov 26, 2005.

  1. Rob

    Rob Guest

    I would like to use Forms Authentication on my website but only certain
    pages need to be authenticated. In other word, users can browse many
    pages on the site without having to log in but when the access certain
    pages, they have to be authenticated. Can I use Forms Authentication in
    this scenario or is Forms Authentication for the entire site?

    Thanks

    Rob

    *** Sent via Developersdex http://www.developersdex.com ***
    Rob, Nov 26, 2005
    #1
    1. Advertising

  2. Hello Rob,

    add a location element for the pages that should be authenticated

    like

    <location path="page.aspx">
    <system.web>
    < authorization>
    <allow roles="Role" />
    <deny users="*" />
    </authorization>
    </system.web>
    </location>

    or put all page that need auth together in one directory and specifiy the
    directory name in the location element.

    ---------------------------------------
    Dominick Baier - DevelopMentor
    http://www.leastprivilege.com

    > I would like to use Forms Authentication on my website but only
    > certain pages need to be authenticated. In other word, users can
    > browse many pages on the site without having to log in but when the
    > access certain pages, they have to be authenticated. Can I use Forms
    > Authentication in this scenario or is Forms Authentication for the
    > entire site?
    >
    > Thanks
    >
    > Rob
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    >
    Dominick Baier [DevelopMentor], Nov 26, 2005
    #2
    1. Advertising

  3. Rob

    Rob Guest

    Thanks Dominick,

    I have a lot of files so I think putting them in a separate folder is
    the way to go.

    Rob

    *** Sent via Developersdex http://www.developersdex.com ***
    Rob, Nov 26, 2005
    #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. Andrew Connell
    Replies:
    1
    Views:
    537
    Natty Gur
    Oct 21, 2003
  2. Eric
    Replies:
    2
    Views:
    1,407
    Tommy
    Feb 13, 2004
  3. JEFF
    Replies:
    1
    Views:
    1,007
    =?Utf-8?B?YnJpYW5zW01DU0Rd?=
    Nov 12, 2007
  4. Keltex
    Replies:
    1
    Views:
    388
    Dominick Baier [DevelopMentor]
    Jan 24, 2006
  5. Eric
    Replies:
    2
    Views:
    467
Loading...

Share This Page