I am redirecting from a classic ASP page to an ASP.Net page on a different webserver. The landing aspx page seems to start a new session after postback i.e. my session variables which are set when the page is first hit after the redirect, are being reset after a button on the page is clicked. How do I work around this? Thanks in advance.
我将从一个经典的ASP页面重定向到一个ASP页面。另一个web服务器上的Net页面。登陆aspx页面似乎在回发后开始一个新的会话,例如,我的会话变量在重定向后第一次点击时被设置,在点击页面上的一个按钮后被重置。我怎么解决这个问题?提前谢谢。
3 个解决方案
#1
2
You might want to read "How to Share Session State Between Classic ASP and ASP.NET".
您可能想要阅读“如何在经典ASP和ASP.NET之间共享会话状态”。
But you should know from start, there's no way to just pass the sessions between asp and asp.net using the session-object in both of them.
但是您应该从一开始就知道,在asp和asp.net之间使用会话-对象传递会话是不可能的。
Read the above article and you'll know all about it!
阅读上面的文章,你就会知道它的一切!
#2
0
Microsoft has a page explaining how to share session data between classic ASP en ASP.NET. You can find it here
微软有一页解释如何在ASP.NET*享会话数据。你可以在这里找到
#3
0
OK, I had a look at the HTTP headers being sent to the server in each of the two cases: when redirecting from ASP and from ASP.Net. I noticed that in the case of ASP.Net a cookie was being sent ASP.Net_SessionID. This was not being sent from the ASP page. I did some reading and found out that you can set ASP.Net to run cookieless - http://msdn.microsoft.com/en-us/library/aa479314.aspx. I added the
好的,我查看了在这两种情况下发送到服务器的HTTP头:当从ASP和ASP.Net重定向时。我注意到在ASP的情况下。一个cookie正在被发送。net_sessionid。这不是从ASP页面发送的。我读了一些书,发现你可以设置ASP。Net运行无cookie - http://msdn.microsoft.com/en-us/library/aa479314.aspx。我增加了
sessionState cookieless="true"
to my web.config and all is well. Your assistance is much appreciated.
我的网络。配置和一切都很好。非常感谢你的帮助。
#1
2
You might want to read "How to Share Session State Between Classic ASP and ASP.NET".
您可能想要阅读“如何在经典ASP和ASP.NET之间共享会话状态”。
But you should know from start, there's no way to just pass the sessions between asp and asp.net using the session-object in both of them.
但是您应该从一开始就知道,在asp和asp.net之间使用会话-对象传递会话是不可能的。
Read the above article and you'll know all about it!
阅读上面的文章,你就会知道它的一切!
#2
0
Microsoft has a page explaining how to share session data between classic ASP en ASP.NET. You can find it here
微软有一页解释如何在ASP.NET*享会话数据。你可以在这里找到
#3
0
OK, I had a look at the HTTP headers being sent to the server in each of the two cases: when redirecting from ASP and from ASP.Net. I noticed that in the case of ASP.Net a cookie was being sent ASP.Net_SessionID. This was not being sent from the ASP page. I did some reading and found out that you can set ASP.Net to run cookieless - http://msdn.microsoft.com/en-us/library/aa479314.aspx. I added the
好的,我查看了在这两种情况下发送到服务器的HTTP头:当从ASP和ASP.Net重定向时。我注意到在ASP的情况下。一个cookie正在被发送。net_sessionid。这不是从ASP页面发送的。我读了一些书,发现你可以设置ASP。Net运行无cookie - http://msdn.microsoft.com/en-us/library/aa479314.aspx。我增加了
sessionState cookieless="true"
to my web.config and all is well. Your assistance is much appreciated.
我的网络。配置和一切都很好。非常感谢你的帮助。