how to protect a class with a principalpermissionattribute?



hello! anyone ever manage to do this? after trying nearly everything
i
can think of my code (below) still gives 'request for principal
permissions failed' .

many thanks
x
..
..
..
..
..
..


Protecting to class - this doesnt work (& the tried
role:="administrators", name:="administrator" etc)
< PrincipalPermissionAttribute(SecurityAction.Demand, Role:="BUILTIN
\Administrators") _
Public Class Form1 Inherits System.Windows.Forms.Form
Private Sub Form1_Load(ByVal sender As System.Object, ByVal and As
System.EventArgs) Handles MyBase.Load
Messagebox("form should load if user is admin")
End Sub




if you need more details about this problem:
http://groups.google.com/group/microsoft.public.dotnet.languages.vb/browse_thread/thread/f62c0a75256b91e7/001879dbbf09528d#001879dbbf09528d

.



Relevant Pages

  • SQLClientPermission Error
    ... Request for the permission of type ... Imports System.Configuration ... 'Public Class Form1 ... Private Sub Button1_Click(ByVal sender As System.Object, ...
    (microsoft.public.dotnet.general)
  • Re: How do I do multiple asynchronous ADO connections ?
    ... request is being handled. ... the code uses a fixed length array for the queue and does not ... Set cmConn = New ADODB.Connection ... Private Sub Form_Unload ...
    (microsoft.public.vb.general.discussion)
  • Re: How do I do multiple asynchronous ADO connections ?
    ... request is being handled. ... the code uses a fixed length array for the queue and does not ... Set cmConn = New ADODB.Connection ... Private Sub Form_Unload ...
    (microsoft.public.data.ado)
  • Re: code problem with before update
    ... A reason to use the field level, however, is that it enforces consistency. ... Private Sub Requested_By_BeforeUpdate ... MsgBox "ppdate is now requested", ... MsgBox "Please enter who requested this service request", ...
    (microsoft.public.access.forms)
  • RE: Combo Box search
    ... Me.cbo [Combo24] = Me.txtFieldToMatch ... Private Sub Combo24_AfterUpdate ... One way I have seen is to put the combo in the header section of the form ... record but when i scroll through the records this Request ID remains even as ...
    (microsoft.public.access.forms)