Monday, 2 January 2012

Deploying Code on a SharePoint farm

Problem:  On large farms you may want to restrict code access to different levels, SharePoint 2010 offers 3 options as opposed to MOSS offering 2 options: GAC & Bin.

Initial Hypothesis:  Custom code can go into 3 places in SP2010:
1) GAC (easiest)
2) Bin
3) Sandbox 

GAC is the most open but you may want to restrict what code an do and where it can run.  In 2010 sandbox solutions or bin deployments are more restricted.  Sandbox solutions are way more restricted programatically then bin deployment but they are safer, also note that sandboxes can slow your farm down until the offending solution is expired for the day by SP2010.

Tip: Some code won't work in the bin such as workflows.  Seperate the code so if you are using the bin it goes into the bin and workflows and item events are added to the GAC, ensure you use dll versioning in the GAC (note: Workflows in progress will fail if you simply upgrade the dll in the GAC).

Tip: Include a referenced dll in your wsp deployment:

More Info:
http://msdn.microsoft.com/en-us/library/cc768621.aspx

0 comments:

Post a comment