Sunday, 1 July 2007

Do Not Use Underscores in Host Names

As part of a recent development task, I’d written some code to log users in to an extranet. It worked fine in Firefox, but when used in IE, it kept redirecting users back to the login screen. Debugging showed that users were being successfully authenticated, but that this was being lost as soon as the user tried to navigate to another page. After a long and painful process and the enlisting of help from colleagues, the problem was traced to an underscore in the host name (ie. the hosts file had an entry similar to “”). Is was only half chance that the culprit was discovered—we tried to add a host header in IIS and it complained about invalid characters.

It took about three days of project time and much hair-pulling to pin down this obscure issue. One to note!

No comments: