Security Exception

T

trullock

Hi,

I'm trying to protect certain .aspx pages so that only members in
certain roles can access them.

[PrincipalPermissionAttribute(SecurityAction.Demand, Role = "myRole")]
public partial class myPage : System.Web.UI.Page
{...


When i access that page when not in "myRole" i get a security
exception. This is as I'd expect, but how do i trap and handle the
error so i can display a friendly error page instead of the .NET one?

Thanks

Andrew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,268
Latest member
AshliMacin

Latest Threads

Top