Please help as this has been driving me nuts since last week and I'm still not closer to a solution...
Environment: IIS 7.5, .Net 4.0, jQuery (latest)
I have an internal web service that I call to create a hierarchy object consisting of a number of customers and their relations. In my web service I store the hierarchy object in HttpContext.Current.Session.
Shortly there after in my javascript I loop over the customers visible to the user. For each customer I call an $.ajax function that calls another procedure in my web service. In the C# code I read my hierarchy object from HttpContext.Current.Session and using linq reads the data for the current customer.
My problem is that HttpContext.Current.Session["hierarchy"] returns null for some customers. It's not the same customers each time even though I'm calling the exact same url.
I have tried reading the hierarchy from HttpContext.Current.Session immediately after writing it just to verify that everything in my hierarchy object is actually written to HttpContext.Current.Session.
I have tried logging HttpContext.Current.Session.SessionId to verify that the session is the same and everything adds up.
I have tried with and without EnableSessionState in my Default.apsx
Thanks in advance to anyone who can guide me in the right direction...
./CJ
Is your web service made of WCF? If so, there is no session at all unless asp.net compatibility mode is enabled.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With