同步ASP.NET会话跨多个站点 [英] Synchronizing ASP.NET Sessions Across Multiple Sites

查看:82
本文介绍了同步ASP.NET会话跨多个站点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有同步在多个ASP.NET应用程序会话一个优雅的解决方案吗?我敢肯定,这很容易被认为是一个安全漏洞,但是这牵涉到第三方ASP.NET应用程序,其中有没有扩展能力。出于这个原因,第二个[相关]网站正在开发中,但需要对第三方应用程序创建的会话的直接访问。

Is there an elegant solution for synchronizing sessions across multiple ASP.NET applications? I'm sure this could easily be considered a security hole, but there is a 3rd party ASP.NET application involved, for which there is no ability to extend. For this reason, a second [related] site is being developed, but will require direct access to the sessions created on the 3rd party application.

作为一个例子,当用户登录进/出的一个位点,应在其他部位发生相同的操作。但是,需要注意的是这已经超出了一个典型的SSO是非常重要的。

As an example, when a user logs in/out of one site, the same operation should occur on the other site. However, it's important to note that this goes beyond a typical SSO.

推荐答案

使用SQL Server存储是你最容易solutions.make确保您对SQL对象上设置适当的权限之一。我不熟悉的东西马努曾建议。居然有这样做的另一种方式是有点困难。它通过实施状图案纪念的修改完成。在数据库中存储APP1会话信息,而是其他程序App2能够访问这些数据库,会话信息是通​​过哪些App2的可以参考服务公开。一旦用户移动到APP2并通过验证后,其会话使用该服务恢复。

Using SQL Server to store is one of your most easy solutions.make sure you have proper permissions set on the SQL objects. I am not familiar with what Manu has suggested. There is actually one more way of doing it which is a little difficult. Its done by implementing a modification of the memento like pattern. App1 stores session info in the database but instead the other application App2 getting access to the DB, the session info is exposed via a service which App2 can reference. Once the user moves on to app2 and is authenticated, its session is restored using the service.

希望有所帮助。它在我的项目之一为我工作。

Hope that helps. It worked for me in one of my projects.

这篇关于同步ASP.NET会话跨多个站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆