How to Use:
1. Download the dll and add the reference to your website.
2. Validate the user credentials and if succesful create the cookie using
Blaze.Security.FormsSecurity.SetAuthenticationCookie(string username, double expiration, bool isPersistent, string roles)
(The roles of the user can be mentioned in the fourth parameter separated by ',').
3. Add the Global Application Class file (Global.asax) to your website.
4. Copy and paste the following code into the Global.asax.
void Application_AuthenticateRequest(object sender, EventArgs e)
{
// Code that runs on application authenticate event.
Blaze.Security.FormsSecurity.InsertPrincipal();
}
5. Add entries to your web.config just as you would while using normal forms authentication
<configuration>
<system.web>
.......
<authentication mode="Forms">
<forms loginUrl=" ....."></forms>
</authentication>
......
</system.web>
<location path="....path...">
<system.web>
<authorization>
<allow roles="....Roles separated by coma....."/>
<deny users="*"/>
</authorization>
</system.web>
</location>
</configuration>