- User is authenticated, but not authorised to perform a certain function
- Can protect the page that performs that function in web.config (snippet 1)
- However, by default, when unauthorised user attempts to get to that page, they are shown the "Yellow Screen of Death"
- Can alter this default behaviour in Login.aspx.vb, put this in Page_Load. (snippet 2)
If User.Identity.IsAuthenticated Then
'You were redirected here becasue you're not authorised
Session("sMessage") = "You are not authorised to perform that operation."Response.Redirect("Errors/AccessDenied.aspx")
Other related posts:
Geek Post Monthly Newsletter Volume 2 Issue 6
Exam 70-300 Objective 3
COALESCE T-SQL Function
Add a comment
Please note: comments that are inappropriate or promotional in nature will be deleted.
E-mail addresses are not displayed, but you must enter a valid e-mail address to confirm your comments.
Are you a registered Geekzone user? Login to have the fields below automatically filled in for you and to enable links in comments. If you have (or qualify to have) a Geekzone Blog then your comment will be automatically confirmed and shown in this blog post.