通过 Web/WCF 服务的 ASP.Net 会话

发布于 2024-10-09 20:42:42 字数 123 浏览 0 评论 0原文

我们有一个包含许多 Web 服务器的系统,我们希望将会话状态存储在一个中央位置。

同时,由于防火墙的原因,我们无法直接访问数据库。

有没有人设法序列化会话并将其通过 Web 服务发送以存储在数据库中?

We have a system with many web servers, where we would like to store the session state in a central location.

At the same time we do not have direct access to the database, due to firewalls.

Has anyone managed to serialize session and send it over a web service for storage in a database?

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

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

发布评论

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

评论(2

∞觅青森が 2024-10-16 20:42:42

您需要实现自己的 Session-State Store Provider< /a>.您可以将 MSDN 示例用作起点。

然后,您可以更改 web.config 中的元素以使用该提供程序而不是内置提供程序。

You need to implement your own Session-State Store Provider. There is an MSDN sample you can use as a starting point.

You then can change the <sessionState> element in your web.config to use that provider instead of the built-in one.

一指流沙 2024-10-16 20:42:42

您想要实现一个自定义会话状态存储提供程序,它将执行所需的 Web 服务调用。

此处是详细说明以及自定义 ODBC 连接的示例。它可以根据您的情况轻松更新。恐怕这并不完全是小事。

You want to implement a custom session state store provider, which will perform the required web service calls.

here is a detailed explanation, and an exemple with a custom ODBC connection. It can easily be updated for your case. I am afraid it's not completely trivial.

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