使用 Web 部署项目替换 web.config 中的部分

发布于 2024-07-26 04:03:32 字数 509 浏览 3 评论 0原文

我正在尝试将以下部分替换为空白部分..

 <secureWebPages mode="RemoteOnly" encryptedUri="abc.co.uk" unencryptedUri="www.abc.co.uk" maintainPath="True" warningBypassMode="AlwaysBypass" bypassQueryParamName="BypassSecurityWarning" ignoreHandlers="WithStandardExtensions">
    <files>
        <add path="abc.aspx"/>
    </files>
</secureWebPages>

但是执行后出现以下错误

WDP00002: missing section secureWebPages/configuration.

有人可以在这方面帮助我吗

I am trying to replace the following section to blank section ..

 <secureWebPages mode="RemoteOnly" encryptedUri="abc.co.uk" unencryptedUri="www.abc.co.uk" maintainPath="True" warningBypassMode="AlwaysBypass" bypassQueryParamName="BypassSecurityWarning" ignoreHandlers="WithStandardExtensions">
    <files>
        <add path="abc.aspx"/>
    </files>
</secureWebPages>

But after executing it is giving me the following error

WDP00002: missing section secureWebPages/configuration.

Can any one plz help me in this regard

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

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

发布评论

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

评论(2

背叛残局 2024-08-02 04:03:32

此错误似乎意味着您想要替换的部分在 web.config 中找不到。

例如,我在 WDP 中的条目为

authentication=authentication.config

但是在根目录中找不到身份验证,因为它位于 system.web 下,因此我将其更改为

system.web /authentication=authentication.config

这有效。

请注意,在调试此问题时,我尝试替换整个 system.web 元素,但这似乎也不起作用 - 我不确定是什么导致了这种情况,但如果您无法替换 system.web,我建议您尝试其他元素,看看是否有效,例如connectionStrings

This error appears to mean the section you wish to replace, cannot be found in the web.config.

For example, my entry in my WDP read

authentication=authentication.config

However authentication could not be found in the root, as it is under system.web, so I changed it to

system.web/authentication=authentication.config

and this worked.

Note that while debugging this, I tried to replace the whole system.web element, and this did not appear to work either - I am not sure what caused this, but if you cannot replace system.web, I suggest you try a different element, and see if that works, such as connectionStrings

上课铃就是安魂曲 2024-08-02 04:03:32

所以这个问题最近突然出现在我身上,直到找到 这个 我一直在损失。
看来 web.config 不仅由节组成,还由节组组成。
现在 system.serviceModel、system.web 等都是服务组,因此不能作为一个整体进行替换。

您可以使用“section group”/“section”=x.config 替换组中的部分

希望这会有所帮助:)

So this problem has popped up for me recently and until finding this I was at a loss.
So it seems that the web.config is made up of not only sections, but section groups as well.
Now system.serviceModel, system.web etc are service groups and as such cannot be replaced as a whole.

You can replace sections in the group by using "section group"/"section"=x.config

Hope this helps :)

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