是否可以在 asp classic 和 asp.net 之间共享会话状态

Is it possible to share session state between asp classic and asp.net(是否可以在 asp classic 和 asp.net 之间共享会话状态)

本文介绍了是否可以在 asp classic 和 asp.net 之间共享会话状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在将 ASP Classic 网站迁移到 ASP.Net.最大的障碍之一是 ASP Classic 网站在 SessionState 中存储的大量数据.

We are migrating an ASP Classic website over to ASP.Net. One of the big hurdles is the large amount of data stored in SessionState by the ASP Classic website.

我正在寻找可以在两个应用程序之间共享会话状态的方法.我从 microsoft MSDN 中找到了以下链接,该链接描述了如何与一个共享数据库.不幸的是,它使用二进制格式化程序序列化到数据库中,而我最近对上述二进制序列化有一些不好的经验.

I am looking for ways that session state can be shared between the two applications. I found the following link from microsoft MSDN that describes how to share session with a shared database. Unfortunately it uses the binary formatter to serialize into the database and I have recently had some bad experiences with said binary serialization.

有没有人对如何共享会话状态有其他建议?或二进制序列化的替代方案?

Does anyone have other suggestions on how to share session state? or alternatives to the binary serialization?

推荐答案

您链接到的 MSDN 文章是最好的方法.您可以使用 cookie、隐藏的表单字段、查询字符串参数或任何数量的其他变通办法",但所有这些都是 hack,并且都有问题(安全问题,只是不能正常工作,比完全重写更多的工作等)

The MSDN article you linked to is the best way. You can use cookies, hidden form fields, querystring parameters, or any number of other "workarounds" but all of them are hacks, and all have problems (security concerns, just don't work right, more work than a total re-write, etc.)

这篇关于是否可以在 asp classic 和 asp.net 之间共享会话状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:是否可以在 asp classic 和 asp.net 之间共享会话状态

基础教程推荐