Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
643 views
in Technique[技术] by (71.8m points)

optimization - Very slow loading time with Visual Studio and ASP.NET MVC?

hi,

I'm developing an ASP.NET MVC website with Visual Studio 2010. The site is built and running from the local computer with the local built-in ASP.NET Development Server, the database is located somwhere on the net.

The problem is that it is very slow to load or reload the page, take a look on this sceen :

enter image description here Link to image

Any idea why this is that slow?

BestRegards

Edit : I have found out that this do only happen i Firefox, IE will return the page ALOT faster?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Quick Fix

Just change

http://localhost:XXXX/YourSite/Here

To

http://127.0.0.1:XXXX/YourSite/Here

Much better IMO than disabling IPv6 settings in Firefox, what if you want to use IPv6?

More Permanent Solution

If you want a slightly more permanant solution, you can edit your hosts file, normally C:Windowssystem32driversetchosts on Windows, and add a rule for localhost:

127.0.0.1 localhost

Customising Firefox Specifically

If you do decide you want to disable IPv6 in Firefox itself, there are details of that here: http://kb.mozillazine.org/Network.dns.disableIPv6

Edit: Actually, if you want to fix this in Firefox, rather than disabling IPv6 entirely as in the link I just posted, or as specified by the other answer to this question, give this a read: http://theycallmemrjames.blogspot.com/2010/09/firefox-is-really-slow-testing-sites-on.html This shows how to set a rule for localhost to only use IPv4, so your browser may still use IPv6 as it needs.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...