使用基于表单的身份验证修改SharePoint应用程序Web.config文件 [英] Modifying SharePoint app Web.config file with Forms Based Authentication

查看:129
本文介绍了使用基于表单的身份验证修改SharePoint应用程序Web.config文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个SharePoint应用程序,我们希望用户能够通过激活功能来修改web.config.该应用程序得到了扩展,因此我们有一个基于AD的Web应用程序,另一个是使用基于表单的身份验证(FBA)的应用程序,其中FBA应用程序是主"用户应用程序.

We have a SharePoint application where we want the user to be able to modify the web.config by activating a feature. The application is extended, so we have an AD based web application and another that uses Forms Based authentication (FBA), with the FBA application being the "main" user application.

我们使用SPWebConfigModification类( http://msdn.microsoft.com/zh-CN/library/microsoft.sharepoint.administration.spwebconfigmodification.aspx )写入web.config,以获取激活功能所需的设置.

We use the SPWebConfigModification class (http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spwebconfigmodification.aspx) to write to the web.config for settings we need for the activated feature.

这在基于AD的方面非常有效.但是,当我们尝试在基于FBA的Web应用程序上运行它时,会收到错误消息,因为FBA网站的网站集管理员无权修改服务器上的web.config.鉴于他们是FBA用户,我们也无法在服务器上授予他们权限.

This works great on the AD based side of things. However, when we try and run this on the FBA based web app, we get an error because the site collection administrator for the FBA site, does not have any access to modify the web.config on the server. Given that they are a FBA user, we can not give them rights on the server either.

有人碰到这个吗?有人有没有解决的办法.我假设我可以尝试并让应用程序通过命令行更新web.conifg,但我真的希望由用户在激活功能时完成此操作.我也可以尝试放宽web.config上的安全权限,但这是开始的错误路径.

Has anyone run into this? Does anyone have any work arounds. I assume I could try and have the application to update the web.conifg run via the command line, but I would really like it be done by the user when they activate the feature. I could also try and loosen security rights on the web.config, but that is a bad path to start down.

谢谢! 约翰

推荐答案

一种替代方法是编写一个执行此操作的组件. 可以通过激活功能或更新Webpart来触发.

An alternative would be to write a component which does it. This could be trigged by activating a feature, or updating a webpart.

这意味着您不需要放松安全性,也不需要通过命令行来完成安全性.

This would mean you don't need to loosen security, or do it via the command line.

这篇关于使用基于表单的身份验证修改SharePoint应用程序Web.config文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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