简体   繁体   English

需要如何在两个 .net 2.0 web 运行在同一域上的应用程序之间共享“会话”数据的工作示例

[英]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 服务器。

Here is an article with code sample. 是带有代码示例的文章。

Can you use Application variables for this?您可以为此使用应用程序变量吗?

Application("myVarImSetting") = 5;
int mySetting = (int)Application("myVarImSetting");

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在两个 .net 应用程序之间共享“会话状态”类型数据的最佳方式 - best way to share “session state” type data between two .net applications 在同一解决方案中的两个Asp.Net Web应用程序之间共享文件夹 - Share a folder between two Asp.Net web applications in the same solution 我可以使用 ASP.NET 在同一个 web 域上上传两个 web 应用程序吗? - Can I upload two web applications on the same web domain using ASP.NET? 在同一域上的应用程序之间共享Windows身份验证 - Share Windows-authentication between applications on the same domain 如何在两个应用程序之间共享实体框架? - How to share Entity Framework between two applications? 是否可以在.net 1.1和.net 4.0应用程序之间共享应用程序数据 - Is it possible to share Application data between .net 1.1 and .net 4.0 applications 在 2 个 Web 应用程序之间共享缓存 - Share cache between 2 web applications 如何使用不同的 .NET 版本在两个不同的项目之间共享域模型 - How to share the domain models between two different projects using different .NET version .net在两个程序之间共享配置数据? - .net Share configuration data between two programs? 在终端服务上运行的两个.Net应用程序之间进行通信 - Communicate between two .Net Applications running on terminal services
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM