![](/img/trans.png)
[英]IIS express applicationhost.config security is reset every time a solutions is opened in VS2012
[英]RequestFiltering value for http verbs in applicationhost.config can be overridden in my websites?
如果 http OPTIONS 已經在 applicationhost.config 中配置為 [OPTIONS=false],那么在 web.conig 中配置 http [OPTIONS=true] 時,我的網站會發生什么?
ApplicationHostFile => 添加 http OPTIONS = false 我的網站級別 web.config => 添加 http OPTIONS = true
哪一個會優先? & 在啟動我的網站時會遇到任何問題 [服務器錯誤]?
[例如:如果在 applicationhost.config 中添加 http 響應標頭,我們將收到錯誤消息,提示“不允許重復”。因此,當兩個文件具有相同的標頭時,我們會收到 RequestFiltering http 動詞的任何錯誤?]
如果在 Applicatiohost.config 文件中配置了 HTTP 動詞,例如,
<system.webServer>
<security>
<requestFiltering>
<verbs allowUnlisted="true" applyToWebDAV="true">
<add verb="OPTIONS" allowed="false" />
</verbs>
</requestFiltering>
</security>
</system.webServer>
這可以在我們的網站 web.config 部分中通過配置來覆蓋,
<system.webServer>
<security>
<requestFiltering>
<verbs>
<remove verb="OPTIONS" />
<add verb="OPTIONS" allowed="false" />
</verbs>
</requestFiltering>
</security>
</system.webServer>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.