Click here to Skip to main content
15,888,802 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Share session multiple asp.net application

Session["ID"] = "hi";

how to access this session id in multiple application..........

Thanks,
Posted
Updated 16-Jun-14 22:03pm
v2

1.You cannot do this!
The "Session" is unique for each user that is accessing a web application.
The "Application" session is unique for an application, and for all user of the same web application, but even "Application" session cannot be shared between different web application.

2.If you want to share data between multiple web application, you should save the needed data in database tables, then access it from them.
 
Share this answer
 
Comments
$*Developer - Vaibhav*$ 17-Jun-14 8:22am    
thanks Raul,

about 2 point : i am use 'sessionState mode="SQLServer"' in asp.net application its working properly. But how to access this session in another asp.net application


which one is best for use
sessionState mode="SQLServer OR sessionState mode="StateServer"
Raul Iloc 19-Jun-14 8:29am    
1)You should do like I suggested in my 2nd point above.

2)The sessionState setting only let the IIS to save the users session into memory or in SQL Server tables, but all the data are serialized before to be cached into the database, so its internal staff of the IIS.

3)If you will have a huge number of users that are accessing your web application at the same time, and you are storing for each user a lot of data in the Session, then the "SQLServer" mode is the best solution, because in this way you could have more free memory on your web server; otherwise the StateServer mode should be used.
$*Developer - Vaibhav*$ 19-Jun-14 9:02am    
thanks Raul,

In 1st webapplication i am using sessionState mode="SQLServer" its store the value in to the database, but how can access these session value in to a 2nd webapplication.

thanks once again Raul.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900