[Mono-list] PrincipalPermission not generate exception

Sebastien Pouliot sebastien.pouliot at gmail.com
Mon Feb 14 16:39:32 EST 2011


Security demands are part of CAS and is not supported by Mono. In this
case you can use the imperative syntax (i.e. code) since this
"special" permission is working.

Sebastien

Le 2011-02-14 à 16:25, Jose Pino <joil at joil.cl> a écrit :

> Hi all,
>
> I'm try next code
>
>
> public partial class Default : System.Web.UI.Page
> {
>    [PrincipalPermission(SecurityAction.Demand, Role = "Editor")]
>    public virtual void button1Clicked (object sender, EventArgs args)
>    {
>        button1.Text = "You clicked me";
>    }
> }
>
>
> In windows - .NET 2.0 --> generate "Security Exception" this is OK
> In Debian - Mono 2.6.7 --> Not generate exception !!!
>
> any idea
>
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list


More information about the Mono-list mailing list