Is it possible to embed data in a session state (i.e. session(x)=x), and transfer via server.transfer this session variable from a classic ASP page to an ASP.NET 2.0 page? Is it possible to go the opposite direction? Thanks.
-
-
Nope, ASP and ASP.NET are totally different entities, similar in name only.
The only way to exchange data between them is either via Cookies or some backend store.
I think you can modify ASP to use a SQL Server to store session state, then share it with ASP.NET, but I don't know.
For small amounts of data, your best bet is with Cookies, but remember they're a client-side feature and cannot be trusted or relied upon
-
W3bbo wrote:
For small amounts of data, your best bet is with Cookies, but remember they're a client-side feature and cannot be trusted or relied upon
Or you just iterate the session collection in each and put them on hidden form fields, if you are transfering via form submissions.
However that doesn't update live of course
There's also an work around on MSDN
This works via cookies and a little code
-
blowdart wrote:

W3bbo wrote:
For small amounts of data, your best bet is with Cookies, but remember they're a client-side feature and cannot be trusted or relied upon
Or you just iterate the session collection in each and put them on hidden form fields, if you are transfering via form submissions.
But that still depends on the client complying, you can't trust nor rely on it.
-
W3bbo wrote:

blowdart wrote: 
W3bbo wrote:
For small amounts of data, your best bet is with Cookies, but remember they're a client-side feature and cannot be trusted or relied upon
Or you just iterate the session collection in each and put them on hidden form fields, if you are transfering via form submissions.
But that still depends on the client complying, you can't trust nor rely on it.
Nor can you trust cookies. So add a nonce or checksum
-
It's not easy, but it's possible:
How to Share Session State Between Classic ASP and ASP.NET
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.