Just had a question about session management within ASP .NET. I have looked at the 3 options within IIS (InProc, StateServer and SQL Server) and am having issues deploying session persistence across multiple servers and across multiple web applications. Is there any other options that are available to manage sessions cross sub-domains (from the same parent) as well as over multiple web applications under each domain?
I'll give you an example: Imagine a site www.thisismysite.com.au. When I log in, I go to login.thisismysite.com.au. though browsing the site, I go to www.thisismysite.com.au/MyWebApp/. What I am trying to achieve is for the session to persist across all three links. I am aware of one third party tool that can do this, Groat SessionFarm, but am wondering if there are any others out there? Also, there is a mix of SSL / non SSL if that makes any difference.
Note: I am not worried about identity, I could implement Windows Identity Foundation (or the like) and send claims round all three places. I am after session persistence.
Thanks heaps, Lee
EDIT: I ended up going with a third party piece of code that we could customize for our purposes. Works perfectly, and in buying the source code we can update it as we need to.
ASP.NET session state enables you to store and retrieve values for a user as the user navigates ASP.NET pages in a Web application. HTTP is a stateless protocol. This means that a Web server treats each HTTP request for a page as an independent request.
By default, Asp.Net MVC support session state. Session is used to store data values across requests. Whether you store some data values with in the session or not Asp.Net MVC must manage the session state for all the controllers in your application that is time consuming.
State Server or storage in SQL Server should work fine for what you are trying to do -- even across multiple apps, but you must remember that all applications must have the same MachineKey.
ASPNET-load-balancing-and-ASPNET-state-server
HTH
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With