If i'm not authorized on a controller action, i am getting a blank page and no error message? I'd like to display a message of some sort, Here's my setup:
class MyAuth : AuthorizeAttribute
{
protected override bool AuthorizeCore(HttpContextBase httpContext)
{
if (!httpContext.User.Identity.IsAuthenticated)
return false;
return MyIsCurrentUserInRoles(Roles.Split(",".ToCharArray()));
}
}
used as
[Myauth(Roles="admin")]
class MyController: Controller
{
}
and the result is blank page when i'm not authorized ?
Is that the default behaviour ? if so, what where do i change it to produce a unauth message ?