tags:

views:

1221

answers:

3

Hi

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

+3  A: 

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.

Guffa
I prefer adding "localhost" to network.dns.ipv4OnlyDomains instead of disabling IPv6.
Jabe
No this did not do anything. Same speeds about.
chobo2
@chobo2: Even if it's not your main problem, you will be able to notice the difference once you have found the greater problem.
Guffa
Well lets try to find the main problem first then I can rally see the difference between having this enabled and not.
chobo2
A: 

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.

Tom Anderson
Weird. I want to get to the button of that but I even have the same slowness on IE8.I don't want to get to much off track from my problem but I been wondering about this one too. Why use IIS instead of Cassini for asp.net mvc? I know with asp.net Cassini compiled stuff a bit differently but I am not aware this is the case with MVC since I think it was on asp.net tags which of course MVC does not use.
chobo2
lol not "button" of that. *bottom.
chobo2
+5  A: 

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.

AASoft
where do I comment out this? Like I am not sure where this defintion for IPv6 is.
chobo2
Hmm, I should've mentioned initially."C:\Windows\system32\drivers\etc\"in that folder you will find a file named "hosts". Open it in, for example, notepad, and find this line: ::1 localhostChange it to this:# ::1 localhostAlso, if there is a line in that file that looks like this:# 127.0.0.1 localhostChange it to this: 127.0.0.1 localhostNow you should be done.
AASoft
I think this did the trick. I don't know what ::1 means but uncommiting the loopback like you said did the trick. Is IPv6 suppost to be this bad? Like why does it go so slow????????On a side note though I am not sure why when I tried to edit the host file it first asked me to save it as a new copy and when I tried to save it over the old copy it gave me "accessed denied" even though I am the admin so I had to delete the host file first and then copy a new one into that directory with these changes
chobo2
# localhost name resolution is handled within DNS itself. 127.0.0.1 localhost# ::1 localhost
chobo2
The reason that it asked you to save it as a new file was due to how file permissions and user permissions are set in Vista and onwards. Even though you are "the admin", you are running with regular user permissions. When trying to do something requiring admin permissions, the system asks you whether you actually want to or not (that UAC prompt, with the screen going darker, I'm sure you know it). The hosts file can only be edited by admins, or something to that extent. So if you just open it in notepad, edit, and save, it'll tell you "access denied". In ___my___ opinion, notepad should ask
AASoft
you for elevated permissions (i.e. that UAC prompt), and if you give it permission, it should save, and otherwise tell you "access denied". That's not how it is coded, and that may be just find for whomever at Microsoft that coded it, but I personally think that can be considered a bug. Their whole campaign of "making programs more secure with UAC", and their guidelines for making yuor programs behave correctly on Vista and onwards - apparently these weren't available to the person(s) writing notepad (and a whole lot of other MS programs, for that matter). But I'm sidetracking.
AASoft
The ::1 is to IPv6 what 127.0.0.1 is to IPv4 - the loopback address of your network adapter. I think thats the easier way to describe it.As for why it is _that_ slow - I honestly do not know. With the whole IPv6 thing, and the reworked network stack in Vista, things have changed __lots__. I've actually been planning to read up on this myself, so might as well look into it.I'll post an explanation here if I dont forget of this question.
AASoft
This made dramatic improvement on my machine (5-6 secs to 0). Thanks!
Goran