Re: Declarative role-based security
From: Nicole Calinoiu (nicolec_at_somewhere.net)
Date: 08/26/04
- Next message: tonci.tomic_at_mireo.hr: "WindowsPrincipal.IsInRole does not reflect recent changes in AD"
- Previous message: Nicole Calinoiu: "Re: Can an Assert issued following a Deny override it?"
- In reply to: Jason L James: "Declarative role-based security"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 26 Aug 2004 10:15:14 -0400
Jason,
You should be able to catch the exception by adding a handler for the
Application.ThreadException event. See
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemWindowsFormsApplicationClassThreadExceptionTopic.asp
for details. You may also be able to catch the exception from the code that
lauches the form iself, but that would depend on your implementation
details.
HTH,
Nicole
"Jason L James" <jason@no-spam.dive-master.org> wrote in message
news:412dcb29.20307710@news.demon.co.uk...
> Does anyone know how I catch the exception raised
> when the securityAction.Demand method fails in the
> declarative role-based security example below.
>
> <PrincipalPermission(SecurityAction.Demand, _
> Name:="????", _
> Role:="????")> _
> Private Sub Button5_Click(ByVal sender As System.Object, ByVal e
> As System.EventArgs) Handles Button5.Click
> .....
> .....
> .....
> .....
> End Sub
>
>
> Thanks,
>
> Jason.
- Next message: tonci.tomic_at_mireo.hr: "WindowsPrincipal.IsInRole does not reflect recent changes in AD"
- Previous message: Nicole Calinoiu: "Re: Can an Assert issued following a Deny override it?"
- In reply to: Jason L James: "Declarative role-based security"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]