简体   繁体   English

无法在Web服务器上启动调试。 远程服务器返回错误:(403)禁止

[英]Unable to start debugging on the web server. The remote server returned an error: (403) Forbidden

First of all, this error started happening about two weeks ago and I honestly don't think I have changed any configuration. 首先,此错误大约在两周前开始发生,老实说,我认为我没有更改任何配置。

I have an ASP.NET application that targets framework 4.7.2. 我有一个针对框架4.7.2的ASP.NET应用程序。 It was working fine until two weeks ago. 直到两周前,它的工作情况还不错。 But now when I use the "Local IIS" debug function and then stop debugging, two things happen: 但是现在当我使用“本地IIS”调试功能然后停止调试时,会发生两件事:

  1. When trying to run debug again, I get the following error: 尝试再次运行调试时,出现以下错误:

Unable to start debugging on the web server. 无法在Web服务器上启动调试。 The remote server returned an error: (403) Forbidden. 远程服务器返回错误:(403)禁止。

  1. Before and during the first debug round, I can access the website via a browser. 在第一轮调试之前和期间,我可以通过浏览器访问该网站。 But after I stop debugging, I get 404-Not found when trying to access the site via its url. 但是在我停止调试后,尝试通过其URL访问该站点时会得到404-Not found。 Detailed information includes: "Handler: StaticFile". 详细信息包括:“ Handler:StaticFile”。

I can access the site as soon as I exit Visual Studio. 退出Visual Studio后,我可以立即访问该网站。 And I can debug fine when I reopen the Visual Studio IDE. 重新打开Visual Studio IDE时,我可以进行调试。

Note1: I am using Visual Studio 2017 Version 15.9.15 注意1:我正在使用Visual Studio 2017版本15.9.15

Note2: IIS reset does not help. 注意2: IIS重置没有帮助。 Only restarting Visual Studio helps. 仅重新启动Visual Studio有帮助。

From MSDN : 从MSDN

There are many possible causes for this error, so check your log file and the IIS security settings for the web site. 有许多可能的原因导致此错误,因此请检查您的日志文件和网站的IIS安全设置。

Make sure the server's web.config includes debug=true in the compilation element. 确保服务器的web.config在编译元素中包含debug=true

Make sure that your Web Application folder has the right permissions and that your Application Pool configuration is correct (a password may have changed). 确保您的Web应用程序文件夹具有正确的权限,并且您的应用程序池配置正确(密码可能已更改)。 See Check your IIS Configuration . 请参阅检查IIS配置

If these settings are already correct and you are debugging locally, also verify that you are connecting to the correct server type and URL (in Properties > Web > Servers or Properties > Debug, depending on your project type). 如果这些设置已经正确并且您正在本地调试,则还要验证您是否连接到正确的服务器类型和URL(在“属性”>“ Web”>“服务器”或“属性”>“调试”中,具体取决于您的项目类型)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 VS 2015错误无法在Web服务器上启动调试。 远程服务器返回错误:(403)禁止 - VS 2015 Error unable to start debugging on the web server. remote server returned an error:(403) forbidden 重装 iis 后无法在 web 服务器上启动调试。 远程服务器返回错误:(404) 未找到。` - After reinstalling iis unable to start debugging on the web server. the remote server returned an error: (404) not found.` 无法在 Web 服务器上开始调试。 远程服务器返回错误:(404) 未找到。 在 Visual Studio 中启动调试时出错 - Unable to start debugging on the web server. The remote server returned an error: (404) Not Found. Error when starting debug in Visual Studio 远程服务器返回错误:(403) Forbidden - Web Deploy - The remote server returned an error: (403) Forbidden - Web Deploy 无法在Web服务器上启动调试。 - Unable to start debugging on the web server. 无法在 Web 服务器上开始调试。 Visual Studio 2019 远程调试器 (MSVSMON.EXE) 未出现 - Unable to start debugging on the web server. The Visual Studio 2019 Remote Debugger (MSVSMON.EXE) does not appear 无法在 Web 服务器上开始调试。 无法连接到网络服务器 - Unable to start debugging on the web server. Unable to connect to the webserver 无法在Web服务器上启动调试。 操作超时 - Unable to start debugging on the web server. The operation timed out 无法在Web服务器上启动调试。 该地址对此上下文无效 - Unable to start debugging on the web server. The address is not valid for this context 无法在Web服务器上启动调试。 Visual Studio没有管理员 - Unable to start debugging on the web server. Visual Studio WITHOUT admin
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM