Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Is Your ASP.NET Development Server Not Working?

0.00/5 (No votes)
14 Jun 2010 1  
Is Your ASP.NET Development Server Not Working?

Since Visual Studio 2005, Visual Studio comes with a development web server: the ASP.NET Development Server.

I’ve been using this web server for simple test projects since then with Visual Studio 2005 and Visual Studio 2008 in Windows XP Professional on my work laptop and Windows XP Professional, Windows Vista 64bit Ultimate and Windows 7 64bit Ultimate at my home desktop without any problems (apart from the known custom identity problem, that is).

When I received my new work laptop, I installed Windows Vista 64bit Enterprise and Visual Studio 2008 and, to my surprise, the ASP.NET Development Server wasn’t working.

I started looking for differences between the laptop environment and the desktop environment and the most notorious differences were:

SystemLaptopDesktop
SKUWindows Vista 64bit EnterpriseWindows Vista 64bit Ultimate
Joined to a DomainYesNo
Anti-VirusMcAffeESET

After asserting that no domain policies were being applied to my laptop and domain user and nothing was being logged by the anti-virus, my suspicions turned to the fact that the laptop was running an Enterprise SKU and the desktop was running an Ultimate SKU. After having problems with other applications, I was sure that the problem was the Enterprise SKU, but never found a solution to the problem. Because I wasn’t doing any web development at the time, I left it alone.

After upgrading to Windows 7, the problem persisted but, because I wasn’t doing any web development at the time, once again, I left it alone.

Now that I installed Visual Studio 2010, I had to solve this. After searching around forums and blogs that either didn’t offer an answer or offered very complicated workarounds that, sometimes, involved messing with the registry, I came to the conclusion that the solution is, in fact, very simple.

When Windows Vista is installed, hosts file, according to this contains this definition:

127.0.0.1       localhost
::1             localhost

This was not what I had on my laptop hosts file. What I had was this:

#127.0.0.1       localhost
#::1             localhost

I might have changed it myself, but from the number of people that I found complaining about this problem on Windows Vista, this was probably the way it was.

The installation of Windows 7 leaves the hosts file like this:

#127.0.0.1       localhost
#::1             localhost

And although the ASP.NET Development Server works fine on Windows 7 64bit Ultimate, on Windows 7 64bit Enterprise, it needs to be changed to this:

127.0.0.1       localhost
::1             localhost

And I suspect it’s the same with Windows Vista 64bit Enterprise.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here