P
Patrick
I'm reading myself into security and ASP.Net.
I have written some demo code and now I'm wondering how you deal with
exception handling when you use declarative security
I have a method with the following attribute
[PrincipalPermissionAttribute(SecurityAction.Demand, Name="Patrick")]
private void MyFunction()
{
DoSomething().......
}
When I'm not athorized I will be redirected to a default errorpage.
My question is what is the best way to handle. 1)Redirect to a
customized errorpage or 2) is there a way to handle the exception so I
can raise a user friendly message to my frontend.
Thanks in advance
gr Patrick
I have written some demo code and now I'm wondering how you deal with
exception handling when you use declarative security
I have a method with the following attribute
[PrincipalPermissionAttribute(SecurityAction.Demand, Name="Patrick")]
private void MyFunction()
{
DoSomething().......
}
When I'm not athorized I will be redirected to a default errorpage.
My question is what is the best way to handle. 1)Redirect to a
customized errorpage or 2) is there a way to handle the exception so I
can raise a user friendly message to my frontend.
Thanks in advance
gr Patrick