4

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?

Banshee
  • 15,376
  • 38
  • 128
  • 219
  • I had the same issue a while ago. The local web server was taking forever to serve static files. Unfortunately I never found a solution and the problem went away after a while: http://stackoverflow.com/questions/1664855/why-is-performance-is-slow-when-2010-cassini-serves-static-files – John Farrell Mar 08 '11 at 19:42
  • @jfar, Thanks, that did not help. But I tried IE8 and its MUCH faster, even the ajax calls is so fast that the loading icon do not show? Why is firefox so slow? – Banshee Mar 08 '11 at 19:53
  • Don't know. You should probably edit your question with more details about which browser is doing this. In my case it was happening on any browser. – John Farrell Mar 08 '11 at 19:55

2 Answers2

8

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:\Windows\system32\drivers\etc\hosts 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.

elwyn
  • 10,360
  • 11
  • 42
  • 52
2

http://codewut.de/content/local-iis-dev-server-firefox-slow-request-response-times

If you run into the same issue, disable IPv6 support in Firefox: about:config -> network.dns.disableIPv6 -> true Apparently Firefox and Microsoft Internet Information Server do not like to play together nicely on Vista without human intervention.

More details (and links at bottom): http://weblogs.asp.net/bleroy/archive/2008/12/29/why-are-scripts-slow-to-load-in-firefox-when-using-visual-studio-s-built-in-development-web-server-a-k-a-cassini.aspx

Give this a try, let me/us know if it helps! I've heard a lot about this issue.

Adam Terlson
  • 12,610
  • 4
  • 42
  • 63