Mental Jetsam

By Peter Finch

Archive for the ‘Vista’ Category

Browser slow to connect to localhost on Vista

Posted by pcfinch on July 11, 2008

I’m developing a little HTTP server in C++ on vista (don’t ask why). Anyway, I found that my browser was REALLY slow when trying to connect to the localhost server “http://localhost:8282/” but not the local IP address “http://127.0.0.1:8282/”. When I say slow, I mean about 1 second per connection. A bit of hunting around and I found the following lines in the \windows\system32\drivers\etc\hosts file.

127.0.0.1       localhost
::1             localhost

I didn’t recognize the last line or know what it does… so I commented it out (I live life on the edge some time!!). Anyway, things sped up! e.g.

127.0.0.1       localhost
# ::1             localhost

You’ll have to edit the hosts file as the administrator as it’s protected, but this simple little fixed work for me. If your having a similar problem, I hope this helps you too.

Posted in C++/MFC, Vista | 5 Comments »

Simple tips that improved my Vista experience.

Posted by pcfinch on March 14, 2008

I recently updated my desktop PC to a nice new Intel E8400 running at 3.6Ghz [over-clocked] with 4GB Ram, and an NVidia 8800 GTX with 768MB… ohh… so nice… sooo fast! So I decided to give Vista a go and migrate everything from my old XP system to the new desktop. Please don’t dispair for the old PC, it’s running Suse Linux now… it’s happy. Anyway, I have spent the last month complaining about some aspects of Vista and trying to find ways around what I don’t like about it. Short of reinstalling XP, here are a few Tips that I found made my Vista “experience” much better.

  1. Think Vista borderRemove the padding from the Vista Window borders and make the borders thinner. I don’t know what designer at Microsoft thought having HUGE borders on the windows was a great idea, but personally I did not care for it. So…

    • Right -click on the desktop and open “Personalize”
    • Open “Window Colour and Appearance”
    • Click on the blue text at the bottom of the page “Open classic appearance properties mor more options and you will get presented with the good old “Appearance” section of the “Desktop Properties” dialog.
    • Chick on the “Advanced” button.
    • In the “Item” dropdown select “Border Padding” and set it to “0”.
    • Click “Ok”, then “Ok” again.

  2. Remove the fading (animation) when opening and closing windows. I found that having the windows “Fade in” and “Fade out” when you open and close an application just made Vista seem really sluggish. Even if the application started in a couple of milliseconds the window took time to appear. Your will be amazed at what a difference this makes to your perception of how fast apps start up.

    • Go to the start menu and open the “Control Panel”
    • Then open the “System” panel.
    • Select “Advanced system settings” on the right hand side.
    • Select “Settings” in the “Performance” section.
    • In the “Visual Effects” tab un-check “Animate windows when minimizing and maximizing”
    • Check “Apply”

  3. Search ServiceTurn of the Indexing Service. Ok, this one may not be for everyone but I really think it makes a difference. Think about it… when ever you change a file Vista is going to index it. I’m sure this makes things slowing. I don’t care about this much as my PC is reasonable well organized, I know “usually” know where everything is and I have over 20 years of legacy data floating around (Opps… hint at age there!). However, if you like to be able to find your stuff quickly then this tip is not for you.

    • Go to the start menu and open the “Control Panel”
    • Open “Administrative Tools”
    • Open “Services”. Now, careful when you are in here, you can turn off important stuff by accident.
    • Scroll down to “Windows Search” and right-click to open the properties dialog.
    • Change “Startup type” to “Disables” and click “ok”


For some more great tips check out http://www.petri.co.il/tweaking_window_vista_performance.htm.
Personally I like Aero and hibernation, but “to each their own” I always say!

Posted in Vista | Leave a Comment »

Running ASP.NET 2.0 applications using Vista IIS 7

Posted by pcfinch on March 31, 2007

I’ve been using Vista (RC2) for a while [thanks Microsoft!!! :-)] and I quite like it, apart from the constant security prompts. As a unix/linux programmer as well, the contstant security prompts are not so bad. You come across that a lot on any restricted access/secure platform, it’s just that Vista is so… “in your face”… That said, I’m not going to be swapping to it permanently any time soon. I think I’ll wait till it matures a bit.

Anyway, I just spent 3 hours trying to get ASP.NET running on it under IIS 7 on Vista. It’s not as easy as it sounds as IIS 7 comes locked down pretty tight. After a lot of browsing around I finally worked out how to do it… and it turns out to be relatively simple. Just run the following command.

C:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\aspnet_regiis -i

Simple yes… No… there is more! Because of Visita’s lovely new security model, running this command as a normal user does not work, and because it’s a command line it just gives you a nice [useless] message telling you it can not run the operation.

An error has occurred: 0x800702e4 The requested operation requires elevation.

So, create a shortcut to it, add the “-i” to the end of the command line in the shortcut. Then right click of the shortcut and select “Run as administrator” and it should work.

Good luck!

Posted in C#.NET, Vista | 25 Comments »