title: Why does a change of Session State provider lead to an ASPx page yielding garbage?
body: <p>I have an aspnet webapp which has worked very well up until now. </p>
  
  <p>I was recently asked to explore ways of making it scale better. </p>
  
  <p>I found that seperation of database and Webapp would help. </p>
  
  <p>Further I was told that if I changed my session providing mechanism to SQLServer, I would be able to duplicate the Web Stack to several machines which could each call back to the state server allowing the load to be distirbuted better.</p>
  
  <p>This sounds logical.  So I created an ASPState database using ASPNet_RegSQL.exe as detailed in many locations across the web and changed the web.config on my app from:</p>
  
  <pre><code>&lt;sessionState mode="InProc" cookieless="false" timeout="20" /&gt;
  </code></pre>
  
  <p>To:</p>
  
  <pre><code>&lt;sessionState mode="SQLServer" 
   sqlConnectionString="Server=SomeSQLServer;user=SomeUser;password=SomePassword"
   cookieless="false" timeout="20" /&gt;
  </code></pre>
  
  <p>Then I addressed my app, which presented me with its logon screen and I duly logged in.</p>
  
  <p>Once in I was presented, with a page that was not with the page I was expecting.</p>
  
  <p>I can change the sessionstate back and forth.  This problem goes away and then comes back based on which set of configuration I use.</p>
  
  <p>Why is this happening?</p>