Re: FormsAuthentication - Roles

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Saravana (saravank_at_sct.co.in)
Date: 12/15/04


Date: Wed, 15 Dec 2004 23:58:12 +0530

Check out this article,

How To Implement Role-Based Security with Forms-Based Authentication in Your
ASP.NET Application by Using Visual Basic .NET
http://support.microsoft.com/default.aspx?scid=kb;EN-US;306238

-- 
-Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"Peter Morris [Air Software Ltd]" <peter.morris@guess.co.uk> wrote in
message news:em9GHLt4EHA.924@TK2MSFTNGP14.phx.gbl...
> Hi
>
> I validate the username/password and then execute the following code
>
>      System.Web.Security.FormsAuthentication.RedirectFromLoginPage(
>       authorId, RememberCheckBox.Checked
>      );
>
> One folder I want to restrict to anyone logged in.....
>
>  <location path="Members">
>   <system.web>
>    <authorization>
>     <deny users="?"/>
>    </authorization>
>   </system.web>
>  </location>
>
> On another folder I want to restrict access only to a member which has
> "IsAdministrator" set to True in the database.
>
>  <location path="Admin">
>   <system.web>
>    <authorization>
>     <deny users="*"/>
>     <allow roles="Admin"/>
>    </authorization>
>   </system.web>
>  </location>
>
> Is this correct?  How do I tell FormsAuthentication that the current user
> has the Admin role?
>
> Thanks
>
>
> -- 
> Pete
> ====
> Read or write articles on just about anything
> http://www.HowToDoThings.com
>
> My blog
> http://blogs.slcdug.org/petermorris/
>
>


Relevant Pages

  • How to Restrict Access to Folders on a Second Drive
    ... The only way that I know of to restrict access to ... going to "Folder Options" in the Control Panel. ... Under the "security" tab, you ... The drive is NTFS however the "Make this ...
    (microsoft.public.windowsxp.security_admin)
  • How to Restrict Access to Folders on a Second Drive
    ... The drive is NTFS however the "Make this ... folder Private" checkbox only works on folders under the ... >> How can I restrict access to directories that are not ... >You need to have the disk formatted with NTFS to set ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Cant restrict access to folders and files
    ... > sharing" in the Folder Options panel in the Control Panel ... > change the permissions for an individual user and entire ... I just want to restrict access to other users on ... > the local domain. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: combining user isolation with shared folders
    ... create a virtual diretory and map to the path. ... To restrict access, apply proper NTFS permissions on the physical directory. ... > folders under the site root." ... >>folder, but every user also has access to a common tree of folders (for ...
    (microsoft.public.inetserver.iis.ftp)