Session sharing between ASP and ASP.NET

The question comes back every so often, so I thought I'd post about it.
 
Almost all existing solutions are intrusive and need to modify the code of the ASP application, the ASP.NET application or both. All solutions incur a performance cost as the data has to be marshaled between the COM world of ASP and the .NET world of ASP.NET.
 
First, there’s a solution in MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/converttoaspnet.asp but it necessitates modifications on both sides and needs a database, which could degrade the application’s performance.
 
There are also a few commercial products, all in the $200 to $300 range:
 
http://www.consonica.com/solutions/statestitch/ which just requires one include on top of each ASP page that uses the session. One drawback is that it doesn’t support COM objects in the session, except for Dictionary.
 
http://www.sessionbridge.com/ which requires more code changes to all places where the ASP session is used.
 
And then, there is my own approach, which is the only one that I know of that requires no source code change anywhere (except a few very particular cases), but it’s just a proof of concept, nothing I would use in a production environment (we have no performance data):
http://www.dotnetguru.org/articles/us/ASP2ASPNET/ASP2ASPNET.html
 
And a very similar attempt which may scale better:
 
My own approach is shared source, so anyone is free to improve on it.

3 Comments

  • Nitmal: not that I know of so I'd say it's relatively risky. It totally depends on the type of project. On the bright side, the source is totally free to use and modify. If I can be of assistance, you can e-mail me through the contact form.

  • Looks mission critical from your description...
    Another thing to consider is the amount of data you store in session and how often you query it.
    Contact me through the contact form of this blog, we can talk about the different options that you have.

  • Abhi:
    1. No.
    2. No, it's entirely unsupported and experimental.
    3. On each server, which should be set up to share the ASP.NET session. The ASP part will pick it up, which is a nice bonus.
    4. No luck for JSP. I don't know of a session sharing solution between JSP and ASP/ASP.NET.

Comments have been disabled for this content.