Re: Forms Authentication Question

From: Dominick Baier [DevelopMentor] (dbaier_at_pleasepleasenospamdevelop.com)
Date: 11/26/05

  • Next message: Rob: "Re: Forms Authentication Question"
    Date: Sat, 26 Nov 2005 10:58:59 -0800
    
    

    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 ***
    >


  • Next message: Rob: "Re: Forms Authentication Question"

    Relevant Pages

    • Re: SSO advice
      ... You can do both Windows Integrated aith and forms auth if you want. ... Basically, the main site is forms authentication, it has a "sub-site" within ... > applications that the user has authorization. ...
      (microsoft.public.dotnet.security)
    • Re: Can I force 401 error when user not authenticated?
      ... of functionality you get from windows role based authorization. ... So if you want to get that going with forms based authentication then ... Sorry for my unclear response - I am using Forms auth. ...
      (microsoft.public.dotnet.framework.aspnet.security)
    • Re: Forms Authentication - "Deny users = ?" necessary
      ... I wouldn't say rhar auth and aurthz are mixed. ... you can use forms auth to manage 'Sessions' in your webapp. ... ROLES to perform authorization tasks inside your webapp, ... > I can't believe Authentication and Authorization are mixed... ...
      (microsoft.public.dotnet.framework.aspnet.security)
    • Re: Bypass forms authentication
      ... I tried using the location element and it still loops between pages. ... If the database connection fails I want the ... which in turn fails to connect to the db and redirects them to the ... >> authentication by using the authentication and authorization settings in ...
      (microsoft.public.dotnet.framework.aspnet.security)
    • Need info on how to test for roles defined in web.config.
      ... I am using forms based authentication. ... if a user has access to a specific web page through some automation method ... I was looking at the web.config parameters for location element and thought ... have the page test to see if the required roles for the location are valid ...
      (microsoft.public.dotnet.framework.aspnet.security)