Exception Handling declarative security

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Exception Handling declarative security

    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
    Patrick Guest

  2. Similar Questions and Discussions

    1. Custom IPrincipal and declarative security checking
      download http://www.pluralsight.com/toolcontent/show_pipeline.zip put the ashx file in a web app and run it through your browser - you'll see the...
    2. Custom HttpHandlers and Declarative Security
      Hello All, I am using maverick.net (a framework based around a custom httphandler in ASP.NET) and I'm trying to integrate declarative security...
    3. Declarative Security in ASP .net
      Hi, I am trying to use declarative security in a ASP .net application With the statement below ...
    4. SoapExtension for Global Exception handling; but prevent exception from propagating!!
      Hi, I wrote a SoapExtension for Global Exception handling in Webservice and it works!!!! Now i want to catch the exception that happen in the...
    5. Exception Handling.
      Hi, Considering the scenario for handling exceptions in Web Application where we have Presentation layer, Business layer and Data Access layer; if...
  3. #2

    Default Re: Exception Handling declarative security

    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.c om...
    > 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

    Chris Rolon Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139