My Local Host goes so slow now that I am on windows 7 and Asp.net MVC

自古美人都是妖i 提交于 2019-12-18 01:21:57

问题


I switched from windows xp to windows 7 pro 64bit. When my computer was in xp I had 2 gigs of ram and overclocked my cpu to 3.0ghz now I have 4gigs of ram but had to lower my cpu to 2.8ghzs.

Ever since I been running windows 7 local host goes so slow when I run my asp.net mvc site. I don't understand why. It can take up to 20seconds to load up a page. With an average being 10.

The thing I really don't get is that when I use sloppy and put my speed at 256kb it runs alot faster then when I don't use sloppy and just use local host.

My site use to be instant on local host what I figure it should almost be since it is local host. So I can't understand why putting it at a speed is somehow faster.

Is there some option I need to set? Or some IIS setting? I don't think I installed IIS yet since I just use the built in thing from visual stuidos 2008(cassa?)

I get the same slowness in all major browser(firefox,IE,chrome,opera,safari).

Thanks


回答1:


I've had this problem many times, it started with Vista for me. It is due to IPv6. In your hosts file, comment out the definition for the IPv6 address for localhost, and things should go to normal speed. Also, I dont know if you actually need to or not, but I suggest flushing the DNS cache after doing this change, and restart your browser.




回答2:


One possible problem is IPv6. I know that at least Firefox has a problem with how it's implemented in Windows for localhost, so disabling it makes it as fast as it should be.

Browse to about:config and change the network.dns.disableIPv6 key from false to true.

However, this problem usually only adds a few seconds to the load time, so there might be something more afoot in your case.




回答3:


I'm running Windows 7 and I fixed this by going into the hosts file and uncommenting the 127.0.0.1/localhost entry. Apparently it was running to the DNS server and resolving localhost from there.




回答4:


I have noticed this even on Vista.

I simply use IE instead of Chrome/Firefox for quick and dirty programming checks.

The best solution would be to install IIS and not use the built in Cassini web server.




回答5:


You have to make sure that all entries for 127.0.0.1 are placed on the same line in the hosts file. A configuration like this:

127.0.0.1 localhost
127.0.0.1 mysite

should be changed to:

127.0.0.1 localhost mysite

This small modification has increased the speed at my Windows based system incredibly.



来源:https://stackoverflow.com/questions/1416128/my-local-host-goes-so-slow-now-that-i-am-on-windows-7-and-asp-net-mvc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!