简体   繁体   English

VS2010无法调试ASP.NET MVC 3项目

[英]VS2010 could not debug asp.net mvc 3 project

the error "unable to start debugging on the web server. the web server could not find the requested resource" came out whenever i click the debug button or f5. 每当我单击调试按钮或f5时,都会出现错误“无法在Web服务器上开始调试。Web服务器找不到请求的资源”。 i have check through the application pool it was fine. 我已经检查了应用程序池,这很好。 it was able to debug by using the VS server but when it changes to IIS its not debugging and the above error came out. 它能够使用VS服务器进行调试,但是当它更改为IIS时,无法调试,并且出现了上述错误。 when i ask my friends to try out the website, he was able to run it. 当我要求我的朋友尝试该网站时,他能够运行它。 But when i tried only the directory came out. 但是,当我尝试仅目录出来。 I have been encountering this problem for quite some time, wasnt able to solve it.Please Help me. 我已经遇到此问题已有一段时间了,无法解决。请帮助我。

There are two things we commonly make sure are set when we run into this kind of error. 当我们遇到这种错误时,我们通常会确保设置两件事。

1) Under the projects properties->Web tab make sure that the appropriate 'Debuggers' are enabled. 1)在项目属性->“ Web”选项卡下,确保启用了适当的“调试器”。

2) Make sure the project is set to launch a file in the website that you are looking to debug. 2)确保将项目设置为在要调试的网站中启动文件。 (this one may be because of the odd layout of where our entry point is but its worth mentioning). (这可能是因为我们的入口点所在的位置奇怪,但值得一提)。

Hope this helps. 希望这可以帮助。

尝试通过调试->附加到进程->并选择为应用程序运行应用程序池的w3wp.exe,将其附加到应用程序的IIS工作进程。

Are you using Windows 7 or Windows Vista? 您使用的是Windows 7还是Windows Vista? If so, you need to run Visual Studio in admin mode to debug using IIS. 如果是这样,则需要在管理员模式下运行Visual Studio才能使用IIS进行调试。

To start VS as an admin, right click it and select "Run as Administrator". 要以管理员身份启动VS,请右键单击它,然后选择“以管理员身份运行”。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM