Is it possible to share session state between asp classic and 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 之间共享会话状态
- 输入按键事件处理程序 2022-01-01
- C#MongoDB使用Builders查找派生对象 2022-09-04
- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01
- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01
- 如何用自己压缩一个 IEnumerable 2022-01-01
- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01
- WebMatrix WebSecurity PasswordSalt 2022-01-01
- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01
- MoreLinq maxBy vs LINQ max + where 2022-01-01
- C# 中多线程网络服务器的模式 2022-01-01
