[英]need working example of how to share “session” data between two .net 2.0 web applications running on the same domain
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) 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]父站点:[localhost/testSite] web 应用程序 1 站点:[localhost/testSite/webapp1] web 应用程序 2 站点:[localhost/testSite/webapp2]
web app 1 site sets a Session variable ("myVarImSetting") web app 2 site gets a Session variable ("myVarImSetting") 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")项目编译后,先运行web app 1,设置变量,然后在它仍然打开的情况下,浏览到web app 2页面,并显示存储在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.这应该可行,应该有一种方法可以做到这一点,我告诉有,但没有人提供任何证据,以及 .net 2.0 框架的工作演示,使用 asp.net Z9ED39E2EA93158656A985A64E 服务器。
Can you use Application variables for this?您可以为此使用应用程序变量吗?
Application("myVarImSetting") = 5;
int mySetting = (int)Application("myVarImSetting");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.