Click here to Skip to main content
15,308,404 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I need your knowledge regarding an issue, i have a session variable getting deleted automatically while all other sessions are not.

The user session is not aborted during the process.

The only diffrence with other sessions variable is the quantity of data, bascially it contains about 230 line of xml.

The issue only occur in production, but not in local tests.

What do you think?

PS, using database to store the data is not an option !

What I have tried:

My last solution so far, is to implement a method to use the session variable during the 5 page process(kinda to keep it in use so the system does not delete it).

Worked for some time, but then again, the error poped up again.
MadMyche 7-Nov-18 8:16am
Sounds like a multi-page form, and some error processing on a page is setting that session to null.
Ziee-M 7-Nov-18 8:20am
The wired part, is that sometimes it work, other times it does not... while the code have not been changed at all.
Do you think it is possible for a unique session to be set to null while other are not?
MadMyche 7-Nov-18 9:33am
Oh it is possible; such as a user deleting cookies (or not accepting)
alexvw 7-Nov-18 9:05am
Hi there,

Run a search along the entire solution of "Session["SomeName"]", there must be a line of code that is clearing it (given certain circumstances), which are obviously not so evident.

Ziee-M 7-Nov-18 9:09am
No, there is not.
MadMyche 7-Nov-18 9:31am
Apparently there is; I would recommend logging the data every time that the particular session[variable] is set.
Ziee-M 7-Nov-18 10:12am
Based on your comment, its seems you are pretty sure that a session variable can NOT be deleted individualy, can you confirm?
For your answer, no, there is not, the session is only set in a unique page, and only once, after the process is completed, the user can click a button to restart the whole process, in this particular case, instead of getting data from post request (xml data) like the first execution, we get them from the session instead, and the process restarts.
Ryan Peden 7-Nov-18 15:51pm
If you're using in process sessions, maybe the session timeout is set too low? Does this problem always happen, or only when users take a long time to finish the 5 page process?
Ziee-M 8-Nov-18 3:26am
I complete the whole process in les then 3 min. i also log a msg on session_end event.
I dont think it is related to timeout.
Herman<T>.Instance 9-Nov-18 7:07am
Is it running in a webfarm?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900