什么是debugattach.aspx,服务器为什么找不到它? [英] What is debugattach.aspx and why can't the server find it?

查看:107
本文介绍了什么是debugattach.aspx,服务器为什么找不到它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VS 2010和IIS 5在XP(SP3)计算机上进行开发.

I'm developing on an XP (SP3) machine with VS 2010 and IIS 5.

我有同一网站的两个版本.我们已经发布了第一个生产版本,因此我将代码分叉到新的目录树中,并在IIS中设置了新的虚拟目录以指向新的树.这些项目设置为在IIS中而不是VS的服务器中运行.主要站点是一个基于MVC 2的项目.

I have two versions of the same site. We've released our first production version, so I forked the code into a new directory tree, and set up new virtual directories in IIS to point to the new trees. The projects are set up to run in the IIS rather than VS's server. The main site is an MVC 2 based project.

我的问题是,当我在Visual Studio 2010中按F5键开始调试新版本时,出现无法在Web服务器上开始调试.Web服务器找不到请求的资源."昨天的大部分时间里,我试图弄清楚找不到的资源是什么.这发生在到达应用程序启动"之前.我终于想到要查看Web日志,发现只要按F5键,Web日志就会显示对/debugattach.aspx的DEBUG请求,返回码为404(未找到).如果我在旧版本上运行相同的序列,它将显示相同的内容,但是首先使用401代码,然后使用200代码重复该请求.

My problem is that, when I hit F5 in Visual Studio 2010 to begin debugging the new version, I get a "Unable to start debugging on the Web Server. The web server could not find the requested resource." I spent the better part of yesterday trying to figure out what resource it was looking for that it couldn't find. This occurs before it ever gets to "Application Start". I finally thought of looking in the Web logs, and found that whenever I hit the F5 key, the web log shows a DEBUG request for /debugattach.aspx, with a return code of 404 (not found). If I run the same sequence on the old version, it shows the same thing, but first with a 401 code, and then the request repeated with a 200 code.

我首先想到的是VS必须先写出一个"debugattach.aspx"文件,然后调用它,也许它没有对该目录的写许可权,但是据我所知,它确实

My first thought was that VS must be writing out a "debugattach.aspx" file, and then invoking it, and maybe it doesn't have write permission to the directory, but, as far as I can tell, it does.

我已经在debugattach.aspx上进行了搜索,返回的文章的前几页似乎都涉及锁定和超时,主要是在IIS 7和VS 2005上.似乎没有什么适用于这种情况.

I've googled debugattach.aspx, and the first several pages of articles that are returned all seem to refer to lockup's and timeouts, mostly on IIS 7 and VS 2005. Nothing that seems to apply to this situation.

查看有效的旧版本与无效的新版本之间的区别,唯一的事情是虚拟目录的IIS设置以及代码本身上的web.config.但是我并排浏览了这两个站点,并且找不到导致此行为的任何差异.

Looking at what's different between the old version that works and the new version that doesn't, the only things are the IIS setup of the virtual directories, and the web.config on the code itself. But I've gone over the two sites side by side, and can't find any differences that account for this behavior.

有人可以与我分享线索吗?还是有人可以将我指向任何有关debugattach.aspx到底是什么,是什么,DEBUG HTTP请求是什么和/或VS如何使用它们的文档?

Does anybody have a clue they can share with me? Or can anyone point me to any documentation on what exactly debugattach.aspx is/does, and what a DEBUG HTTP request does, and/or how VS uses them?

谢谢.

推荐答案

基于

Based on this old posting, DebugAttach.aspx is implemented by the HTTP handler System.Web.HttpDebugHandler. I did not actually see this handler referenced anywhere in IIS7 though - it's possible that this implementation was merged into some other handler down the road. Definitely some sort of handler though. When it's working, you see 200 (success) messages in the logs.

我有2种不同的方法遇到相同的问题,其中由于调试处理程序遇到问题,导致VS2010中的F5调试失败.使用IIS Failed Request Tracing日志,我能够看到IIS模块正在干扰的实例.有一次,UrlScan.dll被阻止了DEBUG动词.在另一种情况下,从HTTP到HTTPS的重定向导致调试处理程序返回302.在这两种情况下,VS都用类似的对话框禁止.

I had this same problem 2 different ways, where F5 debugging failed in VS2010 because of a problem reaching the debug handler. Using the IIS Failed Request Tracing logs, I was able to see instances where IIS modules were interfering. In once case, UrlScan.dll was blocking the DEBUG verb. In another, a redirect from HTTP to HTTPS was causing the debug handler to return a 302. In both cases, VS barfed with a similar dialog.

无论如何,这里的技巧似乎是弄清楚如何阻止对此URL的DEBUG请求.

At any rate, the trick here seems to be figuring out how a DEBUG request to this URL can be blocked.

这篇关于什么是debugattach.aspx,服务器为什么找不到它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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