[Mono-list] Securitymanager in ASP 2.0
Bernd Seidenspinner
bernd at seidenspinner.tv
Sun Nov 11 12:34:38 EST 2007
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
More information about the Mono-list
mailing list