1

I want sharing of session between my 2 web application.web config of my both application have same machineKey but it is not working for sharing of session.Is there any other options?

user1939371
  • 95
  • 1
  • 3
  • 13

1 Answers1

0

Check this, it is possible but not recommended. You need to use sessionState SQLServer to achieve this.

Sharing sessions across applications using the ASP.NET Session State Service

But i would suggest creating a table and store values in that and access it in old fashioned way. Ultimately sessionState SQLServer is also doing the same thing.

Community
  • 1
  • 1
Guru Kara
  • 6,272
  • 3
  • 39
  • 50
  • Is there any other option without using db. – user1939371 Apr 25 '13 at 07:30
  • @user1939371 you have to store values somewhere, either DB or file system as a XML or a flat text file. And if you try to write a file in ASP.NET, security restrictions and Impersonaitions complexities will come into play. – Guru Kara Apr 25 '13 at 07:55
  • Create a table and name it something like CrossAppSession("key", "value") store your cross app session in this and remove the entries using relevant logic. – Guru Kara Apr 25 '13 at 09:24
  • with the help of SQL Server session State how this is possible? – user1939371 Apr 25 '13 at 09:44
  • If you read the link provided it states some hacky way to achive it, BUT there is a comment of using it seeing that the session keys are not getting cleared and DB growing huge. – Guru Kara Apr 25 '13 at 09:48
  • its means this work is not good through Sql Server session state – user1939371 Apr 25 '13 at 10:04