Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to share session variables between Web Applications.

Status
Not open for further replies.

Videla

Programmer
Jul 28, 2005
98
0
0
US
Hi All,
I have developed two web applications using ASP.NET 2.0
and now i want to share one session variable between these
two web applications. How can i share a session variable
between two web applications. Both these web applications
exists on same server.

My session mode is "InProc" for both web applications.
I also don't want to use SQL Server for sharing sessions.
Is there any other solutions other than using SQL Server.

Any help would be appreciated

 
You can't. A session variable is just that. It is a variable that is available as long as that "session" (browser instance) is active. An application variable will not work either. I really don't see any other way of sharing a variable between apps other than using something like SQL server.
Why do you want/need to do this? This approach seems to me like it can cause lots of problems.

Jim
 
jbenson001,
Thanks for responding. I need to share session variables between web applications and here is my requirement.

I have designed two web applications and now i want to implement security/authentication for these web applications. I want to have one web application such that user can login to that and can see a link for those two Web Applications.

Please let me know is there any other way to implement this.

Thanks in advance for you help...
 
What do you want to pass when you click the link? You can simply use a query string variable.
 
jbenson001
I want to pass the user id to the other web applications
when he logged in and I dont want to pass it in query strings. Hence i need it to store it in a session and share
between these web applications.

 
Well using a query sting is not that unsecure if you are only passing the user ID and not the PW. Like I said, you cannot share session variables between applications.

Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top