performance - Alternatives to using session variables in ASP.NET (including MVC) -


If asked before, I apologize, but in my head I have not got specific questions. / P>

For the website (using ASP.NET MVC) - Display is an important feature. In addition, this is an opportunity that the site can be hosted in an environment where the application pool can be recycled every 20 minutes (or soon to reach the memory threshold). I would like to be totally independent instead of depending on the session variable and instead, the GUID-value must be stored in a cookie. My reasoning is - I do not know how long the session will last due to AppPool recycling and does not want time for its session before time and causes them to log in again and again.

The GUID value in this cookie will serve as a lookup key in a table where I store information like session (user ID value, etc.). So if I need that data then I could recover it from the database. I still use the session / final event to clear that session table of rows with the "Last Activity" value of more than 20 minutes (or long sessions are configured to last). So I think I am still using Session State, not just session variables.

My concern is, however, about the performance again, again, I was curious that there are better ways to avoid using session methods, while what the user knows about And keeping the ability to know about coming to the site "like session" manner. I am still a newbie for MVC, but there have been so many experiences in ASP.Net for many years, so I hope that my question is understandable!

EDIT: I want to stay away from the desire to use SQL session because I am probably in a shared SQL Server hosting environment and I do not think that to remove Exchange SQL session data etc. If necessary, I will have a login with the ability to create / run jobs. Are there any real drawbacks for the dependency on the session_OnEnd with a cookie in AppPool recycling scenario? Can not be executed for the session session, which is currently when the apple is recycled?

You are assuming that sessions are only stored In the methodology, you may have a SQL State session Are,


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -