gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 00:16:43 28 4
gpt4 key购买 nike

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

 <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.

任何人都可以在这方面帮助我

最佳答案

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

例如,我在 WDP 中的条目读取

authentication=authentication.config

但是在root中找不到身份验证,因为它在system.web下,所以我将其更改为

system.web/authentication=authentication.config

这成功了。

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

关于vb.net - 使用 Web 部署项目替换 web.config 中的部分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1108725/

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