1

None of the answers I found on the web was satisfying.

0

Assemblies deployed to the GAC have full trust, while the assemblies deployed to the bin folder runs with the trust level specified for the web application (standard or custom CAS policy).

Assemblies deployed to the GAC available to all of the web applications, while while the assemblies deployed to the bin folder are local to the given web application.

https://social.msdn.microsoft.com/Forums/sharepoint/en-US/1d5e78e4-6699-43a7-b029-b2ae5e03d27a/gac-or-bin-directory?forum=sharepointdevelopmentlegacy

http://blog.sharepointsite.co.uk/2010/07/deploying-to-gac-vs-bin-folder-in-sp.html

Code Access Security (CAS) is a resource-constraints policy that limits the access that an assembly has to protected system resources and operations. SharePoint Foundation has built-in security policies built on top of the built-in security policies of ASP.NET. By default, SharePoint Foundation uses a minimal set of permissions in order to protect the server and underlying infrastructure from malicious code.

If your Web Part needs greater access than what is provided in the minimal settings, there are a number of ways to increase the permissions of your Web Part, but only one is recommended. You can create a custom CAS policy for your Web Part, or increase the overall trust level of the server farm in the web.config file. This is a security risk and is not recommended.

For more information

1
  • Answer is missing What is CAS Policy? & How do we give Full Trust in CAS Policy? – Arsalan Adam Khatri Feb 16 '17 at 22:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.