开发者

Redirect from ASP to ASP.Net Session

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 开发者_如何学Goare 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.


You might want to read "How to Share Session State Between Classic ASP and 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.

Read the above article and you'll know all about it!


Microsoft has a page explaining how to share session data between classic ASP en ASP.NET. You can find it here


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

    sessionState cookieless="true"

to my web.config and all is well. Your assistance is much appreciated.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜