views:

79

answers:

1

So i have a custom CMS running under .Net 3.5 written entirely in c#. The engine is optimized to render for mobile devices, but also server to normal web browsers. It also supports cookieless sessions. Great...

I've chosen not to cache anything (including browser data) in order to control the rendering completely from data. This has been all good until lately.

The engine implements a basic login function that simply logs the user state within a session object.

The behavior is rather strange. User will click through the site no problem. Then login. The login will either go through successfully or just redisplay the login screen, suggesting a cached page being returned or redisplayed... If the login is successful the concurrent page hits will switch arbitrarily between logged in and logged out state... Also suggesting either the session state is not accessible or a cached page being returned.

I have debugged the hell out of the thing.... including using fiddler and the like. When debugging the behavior disappears.

Huh?

One of the sites running on the engine is http://www.wiseguy.mobi (sorry customized for South Africa, so you'll probably not be able to get the password Text Message)!

A: 

Ok, so i've been a dumbass...

The issue was related to the fact that my IIS application was running 2 WorkerProcesses. Thus InProc Session state would return different session object states when the user hits either of the worker processes.

This is why the SQL SessionState persistance has resolved it. Either was its set up rather nicely now, and the issues have been resolved...

Jan de Jager