hi, that global.asax is for authentication aspx page, but compiler return erorr, please check it
<%@ Application Language="C#" %>
using System.Security.Principal;
using System.Web.Security;
protected void Application_AuthenticateRequest(Object sender, EventArgs e)
{
//Fires upon attempting to authenticate the use
if (!(HttpContext.Current.User == null))
{
if (HttpContext.Current.User.Identity.IsAuthenticated)
{
if (HttpContext.Current.User.Identity.GetType() == typeof(FormsIdentity))
{
FormsIdentity fi = (FormsIdentity) HttpContext.Current.User.Identity;
FormsAuthenticationTicket fat = fi.Ticket;
String[] astrRoles = fat.UserData.Split('|');
HttpContext.Current.User = new GenericPrincipal(fi, astrRoles);
}
}
}
}
Parser Error Message: The content in the application file is not valid.
Source Error:
Line 1: <%@ Application Language="C#" %>
Line 2:
Line 3: using System.Security.Principal;
Line 4: using System.Web.Security;
Line 5:
<%@ Application Language="C#" %>
using System.Security.Principal;
using System.Web.Security;
protected void Application_AuthenticateRequest(Object sender, EventArgs e)
{
//Fires upon attempting to authenticate the use
if (!(HttpContext.Current.User == null))
{
if (HttpContext.Current.User.Identity.IsAuthenticated)
{
if (HttpContext.Current.User.Identity.GetType() == typeof(FormsIdentity))
{
FormsIdentity fi = (FormsIdentity) HttpContext.Current.User.Identity;
FormsAuthenticationTicket fat = fi.Ticket;
String[] astrRoles = fat.UserData.Split('|');
HttpContext.Current.User = new GenericPrincipal(fi, astrRoles);
}
}
}
}
Parser Error Message: The content in the application file is not valid.
Source Error:
Line 1: <%@ Application Language="C#" %>
Line 2:
Line 3: using System.Security.Principal;
Line 4: using System.Web.Security;
Line 5: