将 Sharepoint 项目 Dll 从 GAC 移动到 Bin

发布于 2024-08-06 21:58:12 字数 300 浏览 3 评论 0原文

我们有一个 Sharepoint 项目,我们已将该项目的 dll 部署到 GAC。

我们已经看到,最佳实践是将它们放在 bin 目录中。这是基于此问题的答案中的信息: 使用 sharepoint 2007 的 Gac 或 bin 中的 Web 部件 dll

我们必须执行哪些步骤才能进行此更改?

谢谢

设拉子

We have a Sharepoint project where we have deployed the dll's of the project to the GAC.

We have seen that the best practices is to have them in the bin directory. This is based on the information in the answer to this question: Web part dll in Gac or bin using sharepoint 2007

What are the steps that we have to do to make this change?

Thanks

Shiraz

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

琴流音 2024-08-13 21:58:12

本质上有两件事:

这允许 SharePoint 的完全信任程序集能够利用在部分信任(您的)下运行的程序集。

  • 编写自定义代码访问安全文件并将其添加到 SharePoint Web 应用程序的 web.config。

如果您想正确地编写自己的 CAS 文件,可能会很棘手且容易出错。如果您使用诸如 WSPBuilder 这样的工具,它可以自动为您创建一个,我强烈推荐这一点。否则,此处有一份手写指南。一种“作弊”方法是编写一个完全信任您的程序集的 CAS 文件,但这违背了要点。

注意:某些 SP 工件(例如事件处理程序)必须部署到 GAC。

Essentially two things:

This allows SharePoint's full trust assemblies to make use of those operating under partial trust (yours).

  • Write a custom Code Access Security file and add it to the web.config for the SharePoint web application.

Writing your own CAS file can be tricky and error prone if you want to do it properly. If you use a tool such as WSPBuilder it can create one automatically for you, which I strongly recommend. Otherwise, there's a written-by-hand guide here. A "cheat" method is to write a CAS file that fully trusts your assembly, but that's going against the point.

Note: Certain SP artifacts such as event handlers must be deployed to the GAC.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文