critto
asked on
Asp.net MVC Session
Hi Experts,
I have an asp.net MVC application that I have released to a test server online. On my dev machine it works fine, but online, I lose session after a few minutes.
can anyone tell me how to either persist my session variables until the end of the browser session, or if I should pass it out to a cookie.
I am dealing with extremely sensitive info ( medical records ) so security is of the essence.
Critto.
I have an asp.net MVC application that I have released to a test server online. On my dev machine it works fine, but online, I lose session after a few minutes.
can anyone tell me how to either persist my session variables until the end of the browser session, or if I should pass it out to a cookie.
I am dealing with extremely sensitive info ( medical records ) so security is of the essence.
Critto.
ASKER
Hey thanks for your post Roger. Just one question:
"Configure the ASP.NET State Service to run automatically in the Services applet."
How do I do this part??
"Configure the ASP.NET State Service to run automatically in the Services applet."
How do I do this part??
Either that or you are working in a load balanced environment and you are hitting different servers. If that is the case you will need to make sure you use a common state server.
ASKER
I'm being hosted on a commercial server, most probably a virtual machine. My utmost concern is security. I cant have any persisted information. What should I do in this case with my session persistence, without compromising 1. security, and 2. my session persistence.
Im playing with <sessionState mode="InProc" timeout="60" cookieless="UseUri" /> now to see if i can get around my session dying.
It is likely that I will need to persist over a clustered environment once I get past testing on my commercial host, so can you give me any tips on best practice that will work on both?
Im playing with <sessionState mode="InProc" timeout="60" cookieless="UseUri" /> now to see if i can get around my session dying.
It is likely that I will need to persist over a clustered environment once I get past testing on my commercial host, so can you give me any tips on best practice that will work on both?
If you can't store anything then does that mean that your application does not use a DB server?
ASKER
Hi James, apologies.. No I mean't that just session info shouldn't be persisted to a client in any form that's all. I just realised I didn't mention this, but it's an asp.net mvc application. it's connected to an sql server 2008 database.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks guys, I'm going to use sql server for storing session state.
One easy workaround is to use the ASP.NET State Service rather than the in-memory session. Configure the ASP.NET State Service to run automatically in the Services applet, then open web.config and update the <sessionState> element to this:
<sessionState mode="StateServer" stateConnectionString="tcp
Cheers,
Roger