状态服务器会话模式

发布于 2024-08-23 04:02:48 字数 204 浏览 4 评论 0原文

我们的项目设计为托管在两台服务器上。一台服务器将具有包含各种数据库和文件系统访问逻辑的应用程序层,另一台服务器将托管主要包含表示逻辑的 Web 层。

Web层中的表示层将通过Web服务连接到应用层。

我想知道如何访问存储在其他服务器中的会话信息。例如,如果我使用状态服务器模式,如何访问应用层(在服务器 1 中)和 Web 层(在服务器 2 中)中的会话信息。

Our project is designed to be hosted in two servers. One server will have the App Tier which contains the various database and file system access logic, and the other server will host the Web tier which will mainly contain the presentation logic.

The presentation layer in the Web Tier will connect to the App Tier through a Web Service.

I would like to know how can I access the session information which is stored in the other server. For example If Iam using State Server mode how can I access session information in App Tier(In Server 1), in the Web Tier(In Server 2).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

奢华的一滴泪 2024-08-30 04:02:48

我想你不能轻易做到这一点。如果您使用不同的会话提供程序(例如 SQL Server)或使用 分布式缓存机制

I guess you can't do this easily. It would better if you used a different session provider, for example SQL Server or implemented your session data using a distributed caching mechanism.

青春如此纠结 2024-08-30 04:02:48

您需要在 AppTier 中使用 CookieContainer 类。 Web 层将为每个请求将 cookie 传递到 Web 层。

You need to use CookieContainer class in your AppTier. The web tier will pass cookies to web tier for each request.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文