Posted on: 1/8/2014 1:35:13 AM | Views : 3294

I would like to use roles and membership without using the ASP.net membership. As a result, I use the FormsAuthentication_OnAuthenticate in global.asax.cs instead of
using the conventional Login_Authenticate.
When I was debugging this code, I found that the web application keeps authenticating in global.asax.cs
Code is as follows:
protected void FormsAuthentication_OnAuthenticate(Object sender, FormsAuthenticationEventArgs e) { if (FormsAuthentication.CookiesSupported == true) { if (Request.Cookies[FormsAuthentication.FormsCookieName] != null) { try { //let us take out the username now string username = FormsAuthentication.Decrypt(Request.Cookies[FormsAuthentication.FormsCookieName].Value).Name; //let us extract the roles from our own custom c ...

Go to the complete details ...