0

I created two web applications "First" and "second" using session mode sql server to share session from one application to other application. I used following web.config in both applications

<sessionState mode="SQLServer" cookieless="false" timeout="20"
    sqlConnectionString="Server=test\SQLEXPRESS;user id=sa;password=xxx;Application Name=MVC"/>
<machineKey validationKey="someKey" decryptionKey="someOtherKey" validation="SHA1" decryption="AES" />

Finally I hosted two applications in same IIS, its working fine session is sharing. But I hosted first application in one web server and second application another IIS the session is not sharing.

Anyone experienced on the session sharing on different application. please share your thoughts

Liam
  • 27,717
  • 28
  • 128
  • 190
vinoth
  • 35
  • 2
  • 13
  • Are you using [Configure SQL Server to Store ASP.NET](http://support.microsoft.com/kb/317604)?? – huMpty duMpty Dec 12 '13 at 09:20
  • 1
    possible duplicate of [Sharing SQL Server Session State across Web Applications](http://stackoverflow.com/questions/13130239/sharing-sql-server-session-state-across-web-applications) – Liam Dec 12 '13 at 09:22
  • Exactly. I used the same configuration. so only its working for me while I host in same server – vinoth Dec 12 '13 at 09:23
  • You need to [use the same machine key](http://stackoverflow.com/questions/2868316/sharing-sessions-across-applications-using-the-asp-net-session-state-service/3151315#3151315) – Liam Dec 12 '13 at 09:24
  • @Liam Yes am used same machine key in my both applications. See the above web.config – vinoth Dec 12 '13 at 09:29
  • And you've tweaked the SP? – Liam Dec 12 '13 at 09:34
  • Yes Liam. I changed procedure to store same AppName in ASPStateTempApplications table – vinoth Dec 12 '13 at 09:39

0 Answers0