Set <authentication mode="Forms">
Add follow code in Global.asax
protected void Application_AuthenticateRequest(Object sender, EventArgs e)
{
String roles = null;
FormsIdentity identity = null;
if (Context.Request.IsAuthenticated)
{
if (Context.User.Identity.AuthenticationType == "Forms")
{
// get the comma delimited list of roles from the user data
// in the authentication ticket
identity = (FormsIdentity)(Context.User.Identity);
roles = identity.Ticket.UserData;
// create a new user principal object with the current user identity
// and the roles assigned to the user
Context.User = new System.Security.Principal.GenericPrincipal(identity,
roles.Split(','));
}
else
{
// application is improperly configured so throw an exception
throw new ApplicationException("Application Must Be Configured For Forms Authentication");
} // if (Context.User.Identity.AuthenticationType = "Forms")
} // if (Context.Request.IsAuthenticated)
} // Application_AuthenticateRequest