Understanding LinkDemand Security on a Web Server

After deploying an ASP.Net application to a web server, I get this error message using code from an external assembly: "LinkDemand First failure type that failed: System.Security.PermissionSet Build zone that Error: MyComputer error".

The assembly is included in the \ bin folder, not in the GAC.

I am trying to understand what exactly is a link and why this post will be raised. But looking at the additional information, I don't understand what the problem is.

I am also trying to add a PermissionSetAttribute to the class where the exception message occurs:

 [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name = "FullTrust")]

      

Then the exception will be raised in another assembly class. Etc.

My questions ares:

  • What exactly is going on here? Is it correct that I understand this error message displayed when Jit fails to validate the safety of the code?

  • Perhaps there is a security policy that blocks this (machine.config) or directly modifies security?

  • Is it possible to set the PermissionAttribute for all classes between assembly?
+2


a source to share


1 answer


Navigate to administration tools and local security policy. Although, I don't know the exact reason why you are getting the error, you are basically trying to execute code that is not permitted in the current security policy. Check your paths and security policy and module resolution requirements. Some paths, such as the desktop, will run with a lower security level by default.



0


a source







All Articles