Hi,
I have a simple ASP.NET MVC application. When the first action method is run it stores some data in the Session variable. On the resulting view I have a jquery ajax call triggered by a button to another action method.
When I click the button a different session id is used at the server side, it's a bit random. There is sometimes a gap of a second or so between starting and clicking the button and the Session ID still changes. This breaks the app as it tries to retrieve the data stored by the first action method.
Any idea what's going on? Both requests are to the same URL.
- I see method one instantiate a new session with Id X and store the data.
- Immediately after loading the Jquery request fires. I see a different session cookie id on the request header.
- I get an error "data not found"
Many thanks,