Synchronizing ASP.NET Sessions Across Sites

Is there an elegant solution for synchronizing sessions across multiple ASP.NET applications? I'm sure this could easily be considered a security hole, but there is a third party ASP.NET application that cannot be extended. For this reason, a second [sibling] site is being developed, but requires direct access to sessions created in a third party application.

As an example, when a user logs into / from one site, the same operation should be performed on the other site. However, it is important to note that this is outside the scope of regular SSO.

0


source to share


4 answers


Using SQL Server for storage is one of the simplest solutions. Make sure you have the appropriate permissions for SQL objects. I am not familiar with what Manu suggested. There is actually another way to do this, which is a little tricky. This is done by implementing a modification to the resembling template. App1 stores session information in the database, but instead App2 accesses the database, the session information is exposed through a service that App2 can refer to. When the user navigates to app2 and authenticates, his session is restored using the service.



Hope it helps. This worked for me in one of my projects.

+1


source


Try the memcached session state provider: http://www.codeplex.com/memcachedproviders Since the cache is running in a separate service, I'm sure you can access the same storage pool from different applications.



+1


source


Cookies is an option that assumes that the application stores some key data in its cookies. If another site is on the same domain, it can read them.

0


source


Use NCache - http://www.alachisoft.com/ncache/

This will help you achieve what you are looking for.

It also built in ASP.NET Session State Distributed Cache and helps you share sessions across multiple sites. Details here

0


source







All Articles