need working example of how to share “session” data between two .net 2.0 web applications running on the same domain
-
06-07-2019 - |
Question
i would like a working example, that uses a asp.net session state server, to share a session variable between two .net 2.0 web applications both running on the same domain, just in different folders ( same parent folder)
directory structure:
parent site: [localhost/testSite] web app 1 site: [localhost/testSite/webapp1] web app 2 site: [localhost/testSite/webapp2]
web app 1 site sets a Session variable ("myVarImSetting") web app 2 site gets a Session variable ("myVarImSetting")
after the project is compiled, run web app 1 first, to set the variable, then while its still open, browse to web app 2 page, and display the value stored in Session(myVarImSetting")
this should work, there should be a way of doing this, im told there is, but no one has offered any proof, and a working demo for .net 2.0 framework, using asp.net state server.
Solution
Here is an article with code sample.
OTHER TIPS
Can you use Application variables for this?
Application("myVarImSetting") = 5;
int mySetting = (int)Application("myVarImSetting");