Visual Studio 2012 IIS Express 8全新安装-无法连接 [英] Visual Studio 2012 IIS Express 8 Fresh Install - Can't Connect

查看:98
本文介绍了Visual Studio 2012 IIS Express 8全新安装-无法连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio 2010 + IIS Express 7上,我能够将IIS Express用作服务器并浏览站点.

On Visual Studio 2010 + IIS Express 7 I was able to use IIS Express as a server and browse sites.

此后,我已经在IIS Express 8上安装了Visual Studio 2012(在Windows 7 64位上),并且无法浏览该站点上的单个站点.另外,当我查看日志文件(\ Logs和\ TraceLogFiles)时,我什至没有看到任何2012/IISExpress 8应用程序的单个日志条目,更不用说要查找的错误了.

I've since installed Visual Studio 2012 (on Windows 7 64-bit) with IIS Express 8, and I can't browse a single site on it. In addition, when I look at the log files (\Logs and \TraceLogFiles) I don't even see a single log entry for any of the 2012/IISExpress 8 apps, let alone an error to look into.

看着applicationhost.config,我确实看到了我尝试使用正确的路径,apppool和端口运行的站点.

Looking at applicationhost.config, I do see the site I'm trying to run with the correct path, apppool and port.

但是,当尝试运行它时,IIS Express 8会启动,出现异常长的暂停,然后在浏览器中出现无法连接错误.也就是说,在IE9中,我得到"Internet Explorer无法显示该网页",在Chrome中出现糟糕!Google Chrome无法连接到本地主机:60046"

But when attempting to run it, IIS Express 8 starts, I get an unusually long pause, and then I get a can't connect error in the browser. That is, in IE9 I get "Internet Explorer cannot display the webpage," in Chrome "Oops! Google Chrome could not connect to localhost:60046"

还有其他人遇到吗?我需要做些什么才能完成VS2012上IIS Express 8的配置?

Has anyone else run into this? Is there something I need to do to complete the configuration of IIS Express 8 with VS2012?

更新 2013年3月2日

UPDATE Mar 2 2013

这仍然没有解决,但这是症状和部分解决方案的列表.

This is still unresolved but here's a list of symptoms and partial solutions.

IIS Express完全不起作用 最初,在任何情况下我都无法连接到IIS Express.原来,我有2个问题,一个与DNS有关,另一个似乎与Visual Studio 2012中的错误有关.

IIS Express completely non-functional I was unable to connect to IIS Express under any conditions, originally. It turned out I had 2 problems, one relating to DNS, and the other appearing to relate to a bug in Visual Studio 2012.

问题1:Windows DNS 我已将Windows wifi连接设置为使用Google的DNS服务器,而不是将其保留为自动".可以很好地配合:

Issue 1: Windows DNS I had set my Windows wifi connection to use Google's DNS servers, rather than leaving it at Automatic. This worked fine with:

  • IIS
  • 卡西尼(Visual Studio内部网络服务器)
  • 几乎没有其他东西

它不适用于:

  • IIS Express尝试连接到本地主机时-它无法连接,即使从命令行运行IIS Express,也不会涉及Visual Studio.

解决方案是将我的DNS设置重新设置为自动"(然后将路由器切换为使用Google DNS).

The solution was to set my DNS settings back to Automatic (and switch my router to use Google DNS instead).

问题2:Visual Studio 2012中的错误Microsoft尚未确认 这使我意识到IIS Express在命令行中可以正常运行,而唯一剩下的问题是从Visual Studio 2012连接到它.VS2012中的Cassini和IIS(非Express)可以正常工作,包括localhost和失败的相同项目在IIS Express中.

Issue 2: A bug in Visual Studio 2012 Microsoft is yet to acknowledge This got me to a point where IIS Express works fine from command-line, and the only remaining issue is connecting to it from Visual Studio 2012. Cassini and IIS (not Express) from VS2012 work fine, including localhost and the same projects that fail in IIS Express.

但是,当我尝试针对IIS Express运行时,IIS Express托盘图标出现,经过一分钟,Visual Studio似乎冻结,然后托盘图标消失,Visual Studio中出现与该问题相同的错误消息工作室:

When I attempt to run against IIS Express however, the IIS Express tray icon appears, a minute goes by where Visual Studio appears to freeze, and then the tray icon vanishes and the same error message as shown in this question appears in Visual Studio:

在VS2012中调试MVC应用程序尝试两次启动IIS Express

一个奇特的事情是,如果在分钟冻结期间右键单击该托盘图标并尝试针对它打开浏览器,我将获得Web应用程序-该应用程序将运行一分钟并按预期运行.然后,当Visual Studio显然杀死它时,它就会死掉.

One peculiar thing is that if I right-click that tray icon and attempt to open a browser against it during the minute freeze-up, I get the web application - it runs for that one minute and works as intended. Then it dies when Visual Studio apparently kills it.

但是,我无法确定IIS Express是否在w.brian问题中运行了两次.就是说,这可能与Visual Studio 2012错误完全相同,只是显示出略有不同的症状.

I however can't confirm that IIS Express is running twice as in w.brian's issue. That said, this may be the exact same Visual Studio 2012 bug just showing very slightly different symptoms.

Microsoft错误和付费专区,我已将此问题报告给Microsoft.他们开始与我进行诊断,但是后来告诉我,我需要支付250美元才能继续-我不准备做这些事情来帮助他们修复错误.

Microsoft bugs and paywall I've reported the issue to Microsoft. They began diagnosing it with me, but then told me I'd need to pay $250 to continue - something I'm not prepared to do to help them fix their bugs.

关于此的一些错误报告:

There are several bug reports on this:

我的原始错误报告: http://connect.microsoft.com/VisualStudio/feedback/details/766233/

My original bug report: http://connect.microsoft.com/VisualStudio/feedback/details/766233/

他们让我打开了第二个浏览官僚机构的网址: http://connect.microsoft.com/VisualStudio/feedback/details/779161/

A second one they had me open to navigate the bureaucracy: http://connect.microsoft.com/VisualStudio/feedback/details/779161/

w.brian的错误报告: https://connect.microsoft.com/VisualStudio/feedback/details/778864/

w.brian's bug report: https://connect.microsoft.com/VisualStudio/feedback/details/778864/

但是我怀疑这与Microsoft忽略了客户与客户之间的付费专区相同的错误,从而阻止他们实际收集足够的细节以识别此处存在错误.

But I suspect this is all the same bug that Microsoft is ignoring with a paywall between its customers and them, preventing them from actually gathering enough detail to recognize there's a bug here.

由于Microsoft浪费了我的大量时间,我转而仅使用常规IIS作为解决方法.

With Microsoft wasting enough of my time I've moved on to just using regular IIS as a workaround.

那是绝对最新的.对不起大家.

That's the absolute latest. Sorry everyone.

更新8/2013:遇到此问题的计算机此后已经死亡(在其上散布了一些东西),而我的新计算机没有此问题.我已向Microsoft建议他们在此问题上与其他人联系.如果您仍然遇到问题,可以在这里发表评论,以便他们知道如何与您联系.记住,您可以编辑StackOverflow问题,因此您始终可以自己使用更多诊断信息来更新此问题.

Update 8/2013: The machine that was experiencing this issue has since died (spilled something on it), and my new machine doesn't have this issue. I've suggested to Microsoft they reach out to others here with this issue. It may make sense to comment here if you're still experiencing the problem so they know how to contact you. And remember you can edit StackOverflow questions, so you can always just update this question yourself with more diagnosis information.

推荐答案

我在机器上找到了问题所在.

I tracked down the problem on my machine.

当我检查C:\ Windows \ system32 \ drivers \ etc \ hosts文件时,我没有

When I checked my C:\Windows\system32\drivers\etc\hosts file, I did not have

 127.0.0.1   localhost

文件中的

.我记得临时"更改它以解决问题.重新添加到丢失的记录中解决了我的问题.

in the file. I remember changing it "temporarily" to troubleshoot a problem. Adding back in the missing record fixed my problem.

您可以通过简单地ping localhost并确保ping 127.0.0.1而不是其他IP来测试计算机认为本地主机的IP.

You can test what IP your machine thinks localhost is by simply ping localhost and making sure that 127.0.0.1 is pinged and not some other IP.

这篇关于Visual Studio 2012 IIS Express 8全新安装-无法连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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