无法在web服务器上启动调试。web服务器无法找到所请求的资源

时间:2022-09-03 19:59:05

I'm having this error trying to debug my ASP.NET MVC app. I've set the app to "Use Local IIS Web server", and selected ASP.NET as the debugger. Running the site without debugging works just fine, but when I try to debug, I got this error:

我正在尝试调试ASP。我将app设置为“使用本地IIS Web服务器”,并选择了ASP。净的调试器。在不进行调试的情况下运行站点效果很好,但是当我尝试进行调试时,我得到了这个错误:

Unable to start debugging on the web server. The web server could not find the requested source.

I'm using Visual Web Developer 2008 Express Edition.

我使用的是Visual Web Developer 2008 Express Edition。

Does anyone know how to fix this error? Thank you.

有人知道怎么修正这个错误吗?谢谢你!

9 个解决方案

#1


5  

Go to your web project's properties, then the "web" tab, then make sure that you're using the Visual Studio Development Server and not Local IIS or the custom webserver. I'm on VS2010 with Win7 and another developer was developing using a custom webserver URL and not the VS Dev Server

进入web项目的属性,然后是“web”选项卡,然后确保使用的是Visual Studio开发服务器,而不是本地IIS或自定义web服务器。我正在使用Win7开发VS2010,另一个开发人员使用定制的webserver URL而不是VS Dev服务器开发

#2


17  

For those encountering this with Visual-Studio 2012 and/or Windows 8 do the following.

对于使用Visual-Studio 2012和/或Windows 8的用户,请执行以下操作。

You have to add .Net 3.5 (or 4.5) to your Turn Windows Features on or off window. You get to it via :

你必须将。net 3.5(或4.5)添加到打开或关闭窗口的Windows功能中。你通过:

Control Panel -> Programs -> Turn Windows Features on or off

控制面板->程序->打开或关闭窗口功能

无法在web服务器上启动调试。web服务器无法找到所请求的资源

Click the Asp.Net 3.5 and the Asp.Net 4.5 check box in the IIS > WWW Service > Application Development Features folder.

单击Asp。Net 3.5和Asp。在iis> WWW服务>应用程序开发特性文件夹中的Net 4.5复选框。

#3


4  

Sounds like you are trying to develop on IIS and not iis express or development server. If you are using asp.net mvc 4, make sure that the Application Pool is framework 4. If not just make sure that your app pool it matches your asp.net mvc version.

听起来您正在尝试在IIS上开发,而不是IIS express或开发服务器。如果您正在使用asp.net mvc 4,请确保应用程序池是framework 4。如果不只是确保你的应用程序池与你的asp.net mvc版本相匹配。

#4


3  

I had the same problem, and i fixed this way:

我也遇到了同样的问题,我这样解决了:

Go to IIS Manager -> Go to the site -> Error Pages -> Actions: edit feature settings.. -> Make sure you checked "detailed errors for local requests and custom error pages for remote requests".

访问IIS管理器->访问站点->错误页面->操作:编辑功能设置。->确保您检查了“本地请求的详细错误和远程请求的自定义错误页面”。

#5


2  

IF you are using IIS6 and did the add mapping for .* in IIS trick to get MVC working, when you added the .* handler to iisapi.dll you forgot to uncheck the "check the file exists" check box.无法在web服务器上启动调试。web服务器无法找到所请求的资源

如果您正在使用IIS6并在IIS技巧中为.*做了添加映射以使MVC工作,那么当您将.*处理程序添加到iisapi时。你忘记取消勾选“勾选文件存在”复选框。

#6


1  

Also, be sure that the URL you're configuring in Visual Studio matches your Host Headers (Edit Bindings) in IIS. This tripped me up for about an hour this morning before I realized my very stupid error.

另外,请确保在Visual Studio中配置的URL与IIS中的主机头(编辑绑定)匹配。今天早上,这句话把我绊倒了一个小时,直到我意识到我犯了一个非常愚蠢的错误。

#7


0  

Having maxRequestLength or maxAllowedContentLength set to a ridiculously large or small value will also trigger this error.

将maxRequestLength或maxAllowedContentLength设置为一个非常大或小的值也会触发此错误。

#8


0  

What i did, was just type the IP address in the web tab instead of "localhost"

我所做的只是在web选项卡中输入IP地址而不是“localhost”

#9


0  

This happened to me today. Turned out to be that the default website was stopped in iis. I had been working on a second website that didn't use it for a long time. Simple fix but took me a while to see it!

今天发生在我身上的事。原来是iis中的默认网站被停止了。我一直在开发第二个网站,很久没有使用它了。简单的修复,但我花了一段时间看它!

#1


5  

Go to your web project's properties, then the "web" tab, then make sure that you're using the Visual Studio Development Server and not Local IIS or the custom webserver. I'm on VS2010 with Win7 and another developer was developing using a custom webserver URL and not the VS Dev Server

进入web项目的属性,然后是“web”选项卡,然后确保使用的是Visual Studio开发服务器,而不是本地IIS或自定义web服务器。我正在使用Win7开发VS2010,另一个开发人员使用定制的webserver URL而不是VS Dev服务器开发

#2


17  

For those encountering this with Visual-Studio 2012 and/or Windows 8 do the following.

对于使用Visual-Studio 2012和/或Windows 8的用户,请执行以下操作。

You have to add .Net 3.5 (or 4.5) to your Turn Windows Features on or off window. You get to it via :

你必须将。net 3.5(或4.5)添加到打开或关闭窗口的Windows功能中。你通过:

Control Panel -> Programs -> Turn Windows Features on or off

控制面板->程序->打开或关闭窗口功能

无法在web服务器上启动调试。web服务器无法找到所请求的资源

Click the Asp.Net 3.5 and the Asp.Net 4.5 check box in the IIS > WWW Service > Application Development Features folder.

单击Asp。Net 3.5和Asp。在iis> WWW服务>应用程序开发特性文件夹中的Net 4.5复选框。

#3


4  

Sounds like you are trying to develop on IIS and not iis express or development server. If you are using asp.net mvc 4, make sure that the Application Pool is framework 4. If not just make sure that your app pool it matches your asp.net mvc version.

听起来您正在尝试在IIS上开发,而不是IIS express或开发服务器。如果您正在使用asp.net mvc 4,请确保应用程序池是framework 4。如果不只是确保你的应用程序池与你的asp.net mvc版本相匹配。

#4


3  

I had the same problem, and i fixed this way:

我也遇到了同样的问题,我这样解决了:

Go to IIS Manager -> Go to the site -> Error Pages -> Actions: edit feature settings.. -> Make sure you checked "detailed errors for local requests and custom error pages for remote requests".

访问IIS管理器->访问站点->错误页面->操作:编辑功能设置。->确保您检查了“本地请求的详细错误和远程请求的自定义错误页面”。

#5


2  

IF you are using IIS6 and did the add mapping for .* in IIS trick to get MVC working, when you added the .* handler to iisapi.dll you forgot to uncheck the "check the file exists" check box.无法在web服务器上启动调试。web服务器无法找到所请求的资源

如果您正在使用IIS6并在IIS技巧中为.*做了添加映射以使MVC工作,那么当您将.*处理程序添加到iisapi时。你忘记取消勾选“勾选文件存在”复选框。

#6


1  

Also, be sure that the URL you're configuring in Visual Studio matches your Host Headers (Edit Bindings) in IIS. This tripped me up for about an hour this morning before I realized my very stupid error.

另外,请确保在Visual Studio中配置的URL与IIS中的主机头(编辑绑定)匹配。今天早上,这句话把我绊倒了一个小时,直到我意识到我犯了一个非常愚蠢的错误。

#7


0  

Having maxRequestLength or maxAllowedContentLength set to a ridiculously large or small value will also trigger this error.

将maxRequestLength或maxAllowedContentLength设置为一个非常大或小的值也会触发此错误。

#8


0  

What i did, was just type the IP address in the web tab instead of "localhost"

我所做的只是在web选项卡中输入IP地址而不是“localhost”

#9


0  

This happened to me today. Turned out to be that the default website was stopped in iis. I had been working on a second website that didn't use it for a long time. Simple fix but took me a while to see it!

今天发生在我身上的事。原来是iis中的默认网站被停止了。我一直在开发第二个网站,很久没有使用它了。简单的修复,但我花了一段时间看它!