Monday, 5 May 2008

ASP.Net and localhost

Ah the Monday morning software patch routine. Time for a Windows update that wants a restart. After the restart my dual monitor configuration is toast yet again. By now the process for fixing dual mon is quite familiar: click some options, don't panic about the displays being upside down, restart the machine, then change the orientation for the monitor that wasn't working.

Then on to the next issue: ASP.Net debugging using Visual Studio's Cassini server on Vista. Issue #1, IPv6 problems -- edit C:\Windows\System32\drivers\etc\hosts, add an extra : for the localhost mapping i.e. it should say

127.0.0.1 localhost
:::1 localhost

Then on to the next issue: when I attempt to run the website in VS2008, I see that it has fired up Cassini on some random port but the port that IE thinks it is using is two less, e.g. is Cassini is using 49756, IE thinks we are using port 49754. It's consistently off by two. If I manually correct the port in the address bar in IE it's fine. The solution involves some tweaking of settings in Eset NOD antivirus:

http://forums.asp.net/p/1235447/2267983.aspx

There are some nice screen shots and detailed instructions that I won't bother to reproduce here. Suffice to say that you should pay close attention to putting a cross not a check mark beside devenv.exe.

This fix doesn't require a restart of your machine, but you will of course have to stop any current Cassini session.

No comments: