http://www.wictorwilen.se/Post/Deployment-and-security-options-of-custom-code-in-SharePoint-2010.aspx