gpt4 book ai didi

sharepoint - 如何更改 SharePoint 扩展 Web 应用程序的 web.config 文件

转载 作者:行者123 更新时间:2023-12-02 09:47:22 25 4
gpt4 key购买 nike

使用 SharePoint API,如何修改扩展的 webapp web.config 文件?
我必须在此文件中进行一些更改以指定连接字符串、membershipprovider 等...以使用表单例份验证。
目前,我可以更改“主”webapplication web.config 文件,但不能更改扩展文件。

Edited

I'm using Sp 2007. I'm already using SPWebConfigModification class to modify the parent webapp. Thoses modifications are propagated to the extended webapp. I have to change ONLY the extended one. But I don't find the way to do it.

What I'm trying to achieve, is to program a little wizard that:

  • Shows a WebApp list so the user can select one
  • Extend that selected webapp to a different zone
  • Configure that extended zone to use Forms Authentication

谢谢

最佳答案

我从博客上得到了答案。

In your case , you need to write a Web Application scoped feature which after you provision your site using your C# app, it is deployed to the newly-provisioned site and in the receiver of the feature you inject the required web.config settings because in that context configuration API is obtainable , but again bear the following in mind:

If you don’t use SPWebConfigModification class and either use ASP.NET 2.0 configuration API or your own mechanism , propagating changes across the farm is YOUR RESPONSIBILITY. If this happens on an standalone installation then you don;t need to be worried about this.



所以它不能在外部完成。我们必须做一个功能才能实现这一点。

谢谢

关于sharepoint - 如何更改 SharePoint 扩展 Web 应用程序的 web.config 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/184204/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com