Latest Posts

What is the GAC?

Global Assemble Cache (GAC) is the location where you store your global assembly (.dll) file.

Location of GAC: C:\Windows\assembly

For version of .Net Framework (4.0 or above): C:\Windows\Microsoft.NET\assembly 

To open the GAC: 

  • Go to start >> Run
  • Write: c:\windows\assembly\gac_msil

SharePoint Application Deployment:
You can deploy your solution either in Bin Directory or in GAC

  1. Bin directory:
  • Bin directory is a folder located in a root directory of the web application.
  • This is partial trust location and has a low level of Code Access Security (CAS) permissions. You can use web.config file of your Web application to change the CAS policy
  • Bin directory is specific to web application that makes it possible to isolate code to particular web application.
  • You cannot have multiple versions of the same dll in Bin directory 
  1. GAC:
  • GAC is the place where signed assemblies are kept.
  • Assemblies kept in GAC run with full trust by default.
  • They are globally installed so can be utilized in any web application.
  • You can have multiple versions of the same dll in GAC if versioning is enabled. 

Note:  Every SharePoint Farm solution is automatically registered in GAC. I would recommend (as part of Best Practices) not to deploy dll in GAC unless it is needed (In cases like Timer Job, Custom Work flows or any other solution that needs “Global” access to the assembly).

We value your Feedback:

Page URL:

Name:

Email:


Suggestion:

© 2024 Code SharePoint