簡體   English   中英

web.config中的位置+路徑在Azure中不起作用

[英]Location + Path in web.config not working in Azure

剛剛創建了一個新的Asp.Net Core MVC應用程序並將其發布到Azure。

通過將location / path元素添加到web.config並重新發布站點,...。我的azure-app立即被破壞。

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="authenticate" allowOverride="true">
    <system.webServer>
      <security>
        <access sslFlags="SslNegotiateCert" />
      </security>
    </system.webServer>
  </location>
</configuration>

為什么以下內容在Azure Web App中不起作用?

假設您想限制用戶訪問authenticate文件夾下的任何內容,請嘗試以下代碼:-

以下web.config示例將把元素內的任何設置僅應用於站點/ authenticate目錄中的任何資源:

 <location path="~/authenticate" allowOverride="true">
    <system.webServer>
      <security>
        <access sslFlags="SslNegotiateCert" />
      </security>
    </system.webServer>
  </location>

如果不起作用,是否可以啟用system.web下的內容,並讓我知道您遇到了什么錯誤。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM