开发者

Is Sharepoint local bin deployment possible?

开发者 https://www.devze.com 2022-12-11 23:34 出处:网络
I’ve inherited a SharePoint solution where all the projects have strong names and are deployed to the GAC.

I’ve inherited a SharePoint solution where all the projects have strong names and are deployed to the GAC.

I find that its difficult working with proj开发者_如何学JAVAects that are signed, it slows down development, testing and makes debugging difficult.

So, is it possible that SharePoint projects, WebParts, Codebehinds etc be deployed to the local bin instead of the GAC? Is it considered bad practice to deploy to the local bin?


It is always recommanded to use the Bin directory over to GAC, for all the WebParts & Code Behinds. As that will restrict the Trust given to the code, GAC provides full trust to the code.

After deploying to the bin you can gain the required permission using CAS.

I recommend you to read the chapter Application Security of Inside Windows SharePoint Services 3.0 Book

Note: You will have to deploy your code Feature Handler, Timer Job etc to the GAC


By default, SharePoint Web applications are only allowed to run with a very restrictive trust level of WSS_Minimal. If we want to have our Web Part deployed to the bin folder, then in order for it to run we must do one of two things: either set the trust level to WSS_Medium or WSS_Full in the web.config, or create a custom CAS policy that will allow this assembly's managed code to run. In a production environment, you will need to make an informed decision on this yourself.

I would use the GAC for local development and testing and use the bin in production.

To debug locally, check the following in your config file:

  • customErrors=off
  • Enable Stack Traces by adding CallStack=”true” to the SafeMode tag
  • Set the compilation debug attribute to "true"
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号