Hi,
We are going to update our asp.net application to save session in state server. Any attention required to avoid problems after the update?
It is going to run in IIS 6 and IIS 7.
Thanks, P.Gopalakrishnan
Hi,
We are going to update our asp.net application to save session in state server. Any attention required to avoid problems after the update?
It is going to run in IIS 6 and IIS 7.
Thanks, P.Gopalakrishnan
Not tried this on IIS7, but on IIS6 it was simply a case of modifying the web.config to specify the state server. John Saunders is however correct above about the serialisation issue, guess I was just lucky but I will be changing all of my development to use State Server in future as recommended by Brian Reiter.
One nice side effect is that you can increase the number of worker processses when using a state server because they can all share the state from the server (whereas normally the state would in in-process).
Note from MSDN:
To use StateServer mode in a Web farm, you must have the same encryption keys specified in the machineKey element of your Web configuration for all applications that are part of the Web farm. For information on how to create machine keys, see article 313091, "How to create keys by using Visual Basic .NET for use in Forms authentication," in the Microsoft Knowledge Base at http://support.microsoft.com.
I believe that StateServer will enforce the requirement that all objects stored in Session must be serializable. This may not have been enforced by InProc.
Be sure to test before going into production.
You need to ensure objects that you currently store in session state are marked as serializable The refactoring can be substantial