Alan Moseley IT Consultancy

Blog Entry

12/18/2008 - Session Variables Not Working In ASP Application

I had been developing an ASP application for a customer, which when running on IIS on my development workstation worked perfectly. I installed the application to a development server, which also worked fine. Finally I installed it to the production server, at which point it stopped working, specifically the problem related to the inability of my application to read session variables when moving from one page to another.

Checking the machine.config on the production server showed nothing unusual. The answer turned out be that the production servername included an underscore character (_), which prevents cookies from working at the client-side. By using the server's ip address instead of name to utilise the application, the problem was solved.