簡體   English   中英

重裝 iis 后無法在 web 服務器上啟動調試。 遠程服務器返回錯誤:(404) 未找到。`

[英]After reinstalling iis unable to start debugging on the web server. the remote server returned an error: (404) not found.`

由於某些其他原因重新安裝 IIS 后,我現在無法使用“本地 IIS”選項在 visual studio 中調試 asp.net 應用程序。 在重新安裝 IIS 之前,一切正常。

這是我得到的錯誤。 無法在 Web 服務器上開始調試。 遠程服務器返回錯誤:(404) 未找到。`

我檢查了 web.config,debug 是真的

<system.web>
    <authentication mode="None"/>
    <compilation debug="true" targetFramework="4.5"/>
    <httpRuntime/>
    <pages controlRenderingCompatibilityVersion="4.0"/>
</system.web>

檢查 C:\Windows\System32\inetsrv\config 上的 applicationHost.config RequestFiltering 設置為 Allow。

<configSections>
<sectionGroup name="system.webServer">
<sectionGroup name="security">
<section name="requestFiltering" overrideModeDefault="Allow" />
</sectionGroup>
</sectionGroup>
</configSections>

我檢查了調試器日志。 沒有給出任何線索。 %UserProfile%\AppData\Local\Temp\Visual Studio Web Debugger.log 它顯示

IIS 10.0 詳細錯誤 - 404.6 - 未找到

以及一些html內容。 那就是它提到請求過濾的地方,但這看起來不錯。

我不確定是什么破壞了調試功能。

就我而言(Windows 10 和 Visual Studio 2017)我必須在Internet Information Services下安裝ASP.NET 3.5ASP.NET 4.7

點擊開始菜單,然后運行

編寫appwiz.cpl然后點擊Ok

在此處輸入圖像描述

單擊打開或關閉 Windows 功能

在此處輸入圖像描述

轉到 Internet Information Services -> World Wide Web Services -> Application Development Features 並檢查.NET Extensibility 3.5.NET Extensibility 4.7 ,然后單擊 Ok。

在此處輸入圖像描述

關閉 Visual Studio,然后重新打開它。

折騰了一陣子,找到了解決辦法。

  1. 在 iis 中,在默認網站下,選擇左窗格中的應用程序名稱。
  2. 雙擊中間窗格中的 Request Filtering。
  3. 單擊右側窗格中的編輯功能設置。
  4. 選中“允許未列出的動詞”

有效。

暫無
暫無

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

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