This resulted in the following route maps in Global.asax.cs
//Hosted Configuration: Uses .aspx in IIS.
//If MVC installed can map directly.
routes.MapRoute(
"aspx",
"{controller}.aspx/{action}/{id}",
new { action = "Index", id = "" }
);
routes.MapRoute(
"Default",
"{controller}/{action}/{id}"
);
routes.MapRoute(
"Root",
"",
new { controller = "Home", action = "Index", id = "" }
);
I then implemented FormsAuthentication using the
[Authorize(Roles = "User")]
attribute on my actions.
However, when the user visited a "page" w/o sufficient permissions the standard loginUrl attribute of the
loginUrl="~/Account/LogOn"
loginUrl="/Account.aspx/LogOn"
which works nicely.
No comments:
Post a Comment