Re: Roles Authorisation in Forms Authentication

From: Annie Hamilton (ahamilton@here.now)
Date: 06/07/02


From: "Annie Hamilton" <ahamilton@here.now>
Date: Fri, 7 Jun 2002 19:37:45 +0200


"Rupesh Agarwal" <rupesh@cpcis.pt> wrote in message
news:enPQHakDCHA.1272@tkmsftngp04...
> hello,
>
> In the given mentioned links they are checking the roles programmatically
> using the isInRole mathod which i don,t want.
> I want to check the role through the authorisation tag in web.config file.
>
> Thanx and regards
> rupesh agarwal

Once you have set the user's roles in Global_AuthenticateRequest as
described in the articles,
you just need to add the roles to the <authorization> section in Web.Config,
e.g.
<allow roles="MyRole"/>

Annie