Back in October of 2007 I was working on an ASP.NET application for a large financial firm. It was a standard textbook ASP.NET site. Master page, site map, Data Adapters and Data Grids and so on. I had a prototype complete and running on my dev box and decided to deploy it on a staging server and perform some integration tests. For some peculiar reason it stop working. I know, I know we've all heard it before; but it works on my computer! But that is exactly what was happening, it worked perfectly well on the dev box but behaved differently on the server. Upon further investigation it appeared as though session state was being lost. But what could be causing this. I went through the check list; web.config, IIS config and so on.
After some searching on Google I found a posting suggesting that an underscore in the computer name will cause session to be lost. The server in question did have an underscore in it's name. At first I didn't believe the posting and went looking elsewhere. After spending an hour or so on Google I found another independent posting suggesting that an underscore would clobber session state.
I then used the IP address rather than the computer name and eureka it worked. We later changed the server name so it no longer contained any underscores. Problem solved.
Sometimes it's the small things that get us. Thank's to Google, a developer's best friend!
Guess the movie
You talkin' to me? You talkin' to me? You talkin' to me? Then who the hell else are you talking... you talking to me? Well I'm the only one here.