Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Exception Handling declarative security

Reply
Thread Tools

Exception Handling declarative security

 
 
Patrick
Guest
Posts: n/a
 
      04-23-2004
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
 
Reply With Quote
 
 
 
 
Chris Rolon
Guest
Posts: n/a
 
      04-25-2004
You could subscribe to UnhandledException event handler on the current app
domain. In that way you could return a friendlier message.

Chris Rolon

"Patrick" <> wrote in message
news: 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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Declarative event handling from usercontrol mpaine ASP .Net Web Controls 0 09-30-2009 12:42 AM
Declarative use of sqlDataSource in ASP.net 2.0 and Exception Hand =?Utf-8?B?SmVmZkRvdE5ldA==?= ASP .Net 1 02-02-2006 05:35 AM
Performance issue : OC4J and declarative security Alexandre Poitras Java 0 10-28-2005 03:34 PM
j2ee declarative security Hiddle Mamond Computer Security 0 01-29-2004 03:06 PM
Declarative Security in ASP .net MS Newsgroups ASP .Net 1 10-19-2003 07:21 AM



Advertisments
 



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