title: Enabling sticky sessions on a load balancer
body: <p>Any advise on this one would be greatly appreciated, I've been researching all morning and I'm still scratching my head.  I started at a new company a few weeks ago, where I'm the only .NET developer as the development was originally done by an outsourcing company and I've been asked to research.
  My knowledge of the existing system is extremely limited but from what I can gather the situation is as follows.</p>
  
  <p>We would like to enable sticky sessions on an asp.net web site.  From my research I have gathered, I need to do the following steps. We are using the ASP.NET State Service</p>
  
  <p>The setup is a load balance server which services two web servers.</p>
  
  <ol>
  <li>Ensure that both web servers have the same machine key.</li>
  <li>Ensure that the websites have been precompiled before deployment. For serialisation of objects by ASP.NET State Service.</li>
  <li>Ensure that the application path on the iis metabase is identical on both web servers.</li>
  </ol>
  
  <p>I bit of knowledge I'm lacking is where are the sessions are stored.  Are the sessions stored on the load balancer, can they be stored on the load balancer?  From what I've read they are stored by the ASP.NET State Service, should the service be running on the load balancer therefore the sessions are stored o the load balancer.</p>
  
  <p>From what I understand the ASP.NET state service runs on each of the web servers and they just talk to each other so that the sessions are stored across both servers.  I assume that the way they do this is based on the type of algorithm that is used.  Any information would be greatly appreciated. </p>