如何在 Sharepoint Web 应用程序中部署 web.config 修改? [英] how to deploy web.config modifications in a Sharepoint web application?

查看:58
本文介绍了如何在 Sharepoint Web 应用程序中部署 web.config 修改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Sharepoint 2007 中有一个网站.我们使用 wsp 来部署我们的项目.我们可以部署 dll、用户控件、功能,但我不知道如何在 web.config 中包含新行.

I have a website in Sharepoint 2007. We use a wsp to deploy our projects. We can deploy dlls, usercontrols, features, but i don't know how to include new lines in the web.config.

在 web.config 中进行更改的可能方法是什么?

Which would be a possible way to make changes in web.config?

另一件事,我如何在 wsp 中包含资源 (resx)?

Another thing, how can I include resources (resx) in the wsp?

推荐答案

在多服务器场中手动编辑 web.config 是一个坏主意.确保 web.config 文件在每个 WFE 上保持同步很快就会变成一场噩梦.

Manually editing the web.config in a multi-server farm is a Bad Idea. Ensuring the web.config files stay in sync on each WFE will become a nightmare quickly.

使用 SPWebConfigModification 类管理整个场中的 web.config 更改是一个好主意,因为更改将保留在 SharePoint 配置数据库中,并自动推送到场中的每台服务器.

Using the SPWebConfigModification class to manage web.config changes across the farm is a Good Idea, as changes will be persisted in the SharePoint configuration database, and automatically pushed to every server in the farm.

话虽如此,针对类编码可能会很痛苦.幸运的是,有一个 非常好的前端 可以免费使用,在管理中心为您提供一个配置屏幕以添加/删除 web.config 更改.

Having said that, coding against the class can be a pain. Luckily there's a pretty good front-end that's freely available, giving you a configuration screen in Central Administration to add/remove web.config changes.

这篇关于如何在 Sharepoint Web 应用程序中部署 web.config 修改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆