[英]Unable to start debugging on the web server. Unable to connect to the webserver
I am running Visual Studio 2008, IIS 7.5 on Windows 7 x32.我在 Windows 7 x32 上运行 Visual Studio 2008、IIS 7.5。 I am able to run the ASP.NET web site in IIS 7.5 without debugging just fine, but when I press F5 to debug it, I get:
我无需调试即可在 IIS 7.5 中运行 ASP.NET 网站,但是当我按 F5 进行调试时,我得到:
Unable to start debugging on the web server.无法在 Web 服务器上开始调试。 Unable to connect to the webserver.
无法连接到网络服务器。 Verify that the web server is running and that incoming http requests are not blocked by a firewall..
验证 Web 服务器正在运行并且传入的 http 请求没有被防火墙阻止。
In VS
, right click on your web project --> Properties Go to the Web tab.在
VS
,右键单击您的 Web 项目 --> 属性 转到 Web 选项卡。
Make sure the appropriate radio button is selected (Use VS Dev Server, Use Local IIS Web Server, etc)确保选择了适当的单选按钮(使用 VS 开发服务器、使用本地 IIS Web 服务器等)
After a computer freeze I've had that value change on me.电脑死机后,我的价值发生了变化。
Another thing to try:另一件事要尝试:
run " iisreset
" from an administrative
command prompt (basically just restarts the IIS service)从
administrative
命令提示符运行“ iisreset
”(基本上只是重新启动 IIS 服务)
检查您的 IIS 是否正在运行,如果没有尝试初始化他并在 VS 上再次运行。
Try the following:请尝试以下操作:
Verify that your web.config
has the following entry:验证您的
web.config
是否包含以下条目:
<compilation debug="true" targetFramework="2.0" />
Note: If you are targeting framework 1.1, then obviously change the 2.0
to 1.1
.注意:如果您的目标是框架 1.1,那么显然将
2.0
更改为1.1
。
UPDATE:更新:
The `targetFramework` attribute is new in .NET 4.0 and later, so to enable debugging on .NET 2.0 and earlier, then you cannot use the `targetFramework` attribute, like this:
<compilation debug="true" />
Just to check: See if Windows Authentication is enabled or not?只是为了检查:查看是否启用了 Windows 身份验证? It should be enabled.
它应该被启用。 Internet Information Services (IIS) Manager > Expand PC/Server Name > Expand Sites > Select Default Web Site > Select Authentication.
Internet 信息服务 (IIS) 管理器 > 展开 PC/服务器名称 > 展开站点 > 选择默认网站 > 选择身份验证。 It should be enabled.
它应该被启用。
Make sure that the port defined in the Project Url under the Web tab of the properties of the web project is the same one as defined in the IIS Manager.确保在 Web 项目属性的 Web 选项卡下的项目 URL 中定义的端口与 IIS 管理器中定义的端口相同。
I had this issue and fixing the port solved the problem for me.我遇到了这个问题,修复端口为我解决了这个问题。
I had a case, where I could load the site in chrome, but deugger could contact the server.我有一个案例,我可以在 chrome 中加载网站,但 deugger 可以联系服务器。 Turns out Chrome auto-maps .localhost addresses, but VS does not.
原来 Chrome 会自动映射 .localhost 地址,但 VS 不会。
Adding the localhost address to my hosts file solved the issue.将本地主机地址添加到我的主机文件解决了这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.