0

In VS there are is project property which allows you to choose: GAC or Web APP(bin).

  1. Based on what do we make a decision to choose one of option?

  2. Is this property valid only while deploying via VS? or does it also apply when we deploy the published wsp via powershell? Does the powershell commands override this setting?

1 Answer 1

1

Bin directory

A partial trust location. By default, code that runs from this directory has a low level of code access security (CAS) permissions. Administrator must explicitly raise permissions granted to a Web Part so it can function properly. Because of this level of control and defense-in-depth, administrators tend to prefer that assemblies they get can run in the bin directory, with a known set of required CAS permissions.

A bin directory is also specific to a Web application. This makes it possible to isolate code to a particular Web application.

If you want your Web Part to run everywhere, you would need to deploy your bin assembly.

Global assembly cache

A global location where signed assemblies can be deployed. Assemblies run with full trust by default. They are globally installed, so they will work in any Web application.

Generally, there are no CAS restrictions on code installed to the global assembly cache; therefore, you lose the defense-in-depth security benefit.

Also, it can be difficult to deploy your .PDB files (program databases) to assemblies in the global assembly cache.

from this post

The CAS policy is a very complex thing which is not used in common practice.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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