无法在 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

查看:49
本文介绍了无法在 Web 服务器上开始调试.远程服务器返回错误:(404) 未找到.在 Visual Studio 中启动调试时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一段时间前,我已经将项目设置为在 IIS 上运行,当我按 F5 时,它确实连接没有问题.但是最近这停止了工作,当我按 F5/按 Debug->Start debugging 时,我确实收到了这个错误:

I have set up project to be run on IIS for some time ago and when I did press F5 it did connect no problem. But recently this stopped working and I did get this error when I press F5 / press Debug->Start debugging:

无法在 Web 服务器上开始调试.远程服务器返回错误:(404) 未找到.

Unable to start debugging on the web server. The remote server returned an error: (404) Not Found.

这是我的设置:

我不确定发生了什么,可能是一些 VS 更新或 Windows 更新,但我尝试在任何地方使用谷歌搜索,但没有任何效果.附加到进程和以前一样工作正常,但这种更简单的方法不起作用.

I am not sure what happened, probably some VS updates or Windows updates, but I've tried to google everywhere and nothing had worked. Attach to process works fine as before, but this simpler way stopped doing the trick.

更新:

已经尝试过 Process Monitor 找出出了什么问题,看起来 w3wp 尝试访问路径 MyProjectFolder\debugattach.aspx 并且结果是NAME NOT FOUND".不知道这是否是问题的根源.

Have tried Process Monitor to figure out what is going wrong and it looks like w3wp tries to access path MyProjectFolder\debugattach.aspx and the result is "NAME NOT FOUND". Don't know if this is the root of the problem though.

推荐答案

看来我的一位同事编辑了 web.config 并添加了请求过滤,他删除了DEBUG"动词.这不允许在 F5 上进行调试.添加后(或删除请求过滤)一切正常.

It appears that one of my colleagues has edited the web.config and added request filtering where he has removed the "DEBUG" verb. This disallowed debugging on F5. After adding it (or removing request filtering) everything works fine.

附言描述了许多其他可能出现类似错误的问题 这里

P.S. A lot of other possible problems with similar error is described here

这篇关于无法在 Web 服务器上开始调试.远程服务器返回错误:(404) 未找到.在 Visual Studio 中启动调试时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆