We help IT Professionals succeed at work.

Session variables corruption in .NET

Joar
Joar asked
on
Medium Priority
751 Views
Last Modified: 2012-05-06
Is it really correct that session variable are not to be trusted in????
I have a web app (VB.NET) deployd on a web server on the internet that seems to get the session variables corrupted (blanked out) sometimes for no good reason as I can see. There is not a timeout situation! And it happens now and then with no reasonable explanation...
I have read some articles telling that session variables may corrupt if there is a lot of users connecting to the same app at the same time. Could it be??? Isn't the session variables connected to the spesific session??
What is the point of session variables if I cannot trust in them??? What alternatives do I have???
Comment
Watch Question

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
Just a question while I am studying your link: Shoudn't 2 browser accessing the same app create 2 sessions?
If you open application in 2 seperate windows then it will create 2 sessions. But if open another browser from first browser then you will have same session on both the browsers.

Author

Commented:
So there should be no session variable conflicts at any time as long as different users open the same application from different PC's???
Then I feel that the link (which I neeed some time to understand...) is discussing another situation than my clients are into.
Can it be that some error handling in my app is not taken care of and thus causing destruction if the session variables?
Commented:
To me this insertion in the web.config seemed to solve the error situation:
    <sessionState mode="StateServer"
               stateConnectionString="tcpip=127.0.0.1:42424"
               cookieless="false"
               timeout="20">
    </sessionState>

I was running sessionState mode="InProc"
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.