[英]Unable to start debugging on the web server. The remote server returned an error: (404) Not Found. Error when starting debug in Visual Studio
[英]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.5和ASP.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,然后重新打開它。
折騰了一陣子,找到了解決辦法。
有效。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.