Re: Exception Handling declarative security

From: Chris Rolon (crolon_at_hotmail.com)
Date: 04/25/04

  • Next message: Sara: "change password in active directory by webapplication (vb.net)"
    Date: Sun, 25 Apr 2004 05:15:52 -0700
    
    

    You could subscribe to UnhandledException event handler on the current app
    domain. In that way you could return a friendlier message.

    Chris Rolon

    "Patrick" <pveechoud@vxcompany.com> wrote in message
    news:46766261.0404222334.71a60b80@posting.google.com...
    > 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


  • Next message: Sara: "change password in active directory by webapplication (vb.net)"