在Visual Studio中缓慢启动Web应用程序的痛苦 [英] Painfully slow starting a web application in visual studio

查看:158
本文介绍了在Visual Studio中缓慢启动Web应用程序的痛苦的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio中,如果我进行 Debug>开始调试调试>在没有调试的情况下启动,浏览器会在几秒钟后出现,但是在页面加载之前,浏览器会停留在此处并显示连接消息约30秒钟 (即http://localhost:51350/).

In Visual Studio, if I go Debug > start debugging or Debug > Start without debugging, the browser appears after a few seconds, but then is sits there with the connecting message for about 30 secs before the page loads (i.e. to http://localhost:51350/).

我创建了一个全新的空MVC4 Internet应用程序,以检查它不是断点之类.

I have created a brand new empty MVC4 internet application to check it is not breakpoints or something.

在Firefox和Internet Explorer上是相同的.

It is the same on Firefox and Internet Explorer.

随后单击浏览器页面上的链接(或在浏览器中按F5)的速度非常快-只是编译后的初始加载很慢.

Subsequent clicks on the links on the browser page (or pressing F5 in the browser) are very fast - it is just the initial load after compliation that is slow.

我的主机文件中唯一未输入的行是: 127.0.0.1     本地主机

The only uncomented line in my hosts file is: 127.0.0.1       localhost

如果我使用Apache加载网页,速度非常快(当然,在运行VS测试时,我已经关闭了Apache).

If I load webpages with Apache it is very quick (of course I have apache switched off when I'm running the VS tests).

我已将所有更新应用到Visual Studio.

I have applied all updates to Visual Studio.

我正在使用Visual Studio 2012,Windows 7 64位,8GB RAM

I'm on Visual Studio 2012, Windows 7 64-bit, 8GB RAM

推荐答案

看来IIS Express的启动速度很慢.您是否尝试过将IIS代替IIS Express用作Web服务器?有优点和缺点列出 Visual Studio中用于ASP.NET Web项目的Web服务器.

It looks like IIS Express is being slow to start up. Have you tried using IIS as the web server instead of IIS Express? There are pros and cons listed at Web Servers in Visual Studio for ASP.NET Web Projects.

HTH,

安德鲁


这篇关于在Visual Studio中缓慢启动Web应用程序的痛苦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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