Hi all,
I have the following code in Global.asax:
void Application_AuthorizeRequest(object sender, EventArgs e)
{
if (HttpContext.Current.User != null)
{
string userName = "";
if (HttpContext.Current.User.Identity.IsAuthenticated) userName = HttpContext.Current.User.Identity.Name;
Role roleObj = new Role();
string[] roles = roleObj.GetRolesForUser(userName);
if (roles.Length > 0)
{
string roleName = roles[0].ToString();
string currentUrl = "~" + HttpContext.Current.Request.CurrentExecutionFilePath;
string virtualRootPath = HttpContext.Current.Request.ApplicationPath;
if (virtualRootPath == "/") currentUrl = currentUrl.Replace("~", "");
else currentUrl = currentUrl.Replace("~" + virtualRootP ...
Go to the complete details ...