all groups > dotnet security > august 2004 >
You're in the

dotnet security

group:

Declarative role-based security


Re: Declarative role-based security Nicole Calinoiu
8/26/2004 10:15:14 AM
dotnet security: 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


[quoted text, click to view]

Declarative role-based security jason NO[at]SPAM no-spam.dive-master.org
8/26/2004 11:38:07 AM
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,

AddThis Social Bookmark Button