[Mono-list] Securitymanager in ASP 2.0
Sebastien Pouliot
sebastien.pouliot at gmail.com
Mon Nov 12 08:39:46 EST 2007
Hello Bernd,
CAS support (i.e. --security) is experimental in Mono, in fact it was
never tested with 2.0 (nor ASP.NET). I suggest you avoid using it
(--security) unless you are, yourself, only experimenting with CAS or
want to contribute to it's development.
Note that you shouldn't require the security manager for your sample, at
least if you use the imperative syntax (instead of the declarative one).
Sebastien
On Sun, 2007-11-11 at 18:34 +0100, Bernd Seidenspinner wrote:
> Hello List,
>
> i want to write code with CAS in order to check for authorization in ASP 2.0
> Code would look similar to this:
> [PrincipalPermission(SecurityAction.Demand, Role = "Editor")]
> public override void Update()
> {
> ...
> }
> So I tried to enable securitymanager with --security in mod-mono-server2
> After doing so my application fails to start with the following exception in
> apache error log:
>
> Unhandled Exception: System.NullReferenceException: A null value was found
> where an object instance was required.
> at System.Security.Policy.PolicyLevel.Resolve
> (System.Security.Policy.Evidence evidence) [0x00000]
> at System.Security.SecurityManager.ResolvePolicyLevel
> (System.Security.PermissionSet& ps, System.Security.Policy.PolicyLevel pl,
> System.Security.Policy.Evidence evidence) [0x00000]
> at System.Security.SecurityManager.ResolvePolicy
> (System.Security.Policy.Evidence evidence) [0x00000]
> at System.Security.SecurityManager.ResolvePolicy
> (System.Security.Policy.Evidence evidence, System.Security.PermissionSet
> reqdPset, System.Security.PermissionSet optPset, System.Security.Perm
> at System.Reflection.Assembly.Resolve () [0x00000]
> at System.Reflection.Assembly.get_GrantedPermissionSet () [0x00000]
> at System.Security.SecurityManager.LinkDemandFullTrust
> (System.Reflection.Assembly a) [0x00000]
>
> Code was compiled by visual studio and runs as expected on ms.net...
>
> Thanks for your help!!!
>
> Bernd
>
>
>
>
> _______________________________________________
> 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