Hi,
After deployment an ASP.Net application on a webserver, I get this error message by using code from a external assembly: "LinkDemand The type of the first permission that failed was: System.Security.PermissionSet The Zone of the assembly that failed was: MyComputer the error ".
The assembly is include in the \bin folder and not in the GAC.
I try to know what linkdemand exactly is and why this message will raised. But looking for more information, I don't get exactly the problem.
I try also to add the PermissionSetAttribute on the class where the exception message happens:
[System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name = "FullTrust")]
Then the exception will be raised on another class of the assembly. And so on..
My questions ares:
what exactly is going wrong here? Is it true that what I understand this error message displayed when the Jit cannot check the code security?
Is there maybe a security policy that block this (machine.config) or directly change the security?
- Can I set the PermissionAttribute for all classes between a assembly?
Thanks.