2

I have a classic ASP site hosted on IIS and I need to add new pages to the site, but the new pages have to be ASP.NET; I created few pages put them in the same directory and they are working fine.

My problem is the classic ASP and ASP.NET pages are not sharing the sessions. The website on IIS is configured as InProc and use cookies, so my goal is if ASP.NET page defined session as

session("abc")=5

The classic ASP page that is on the same website and directory could read its value. Thanks in advance.

Shadow The GPT Wizard
  • 66,030
  • 26
  • 140
  • 208
user1097275
  • 137
  • 2
  • 9
  • Can you use a common storage? Cookies for example. (A server local storage like file system may be a solution too but I think it's TOO ugly, dirty and tricky to maintain). – Adriano Repetti Mar 06 '12 at 12:05
  • 1
    possible duplicate of [ASP3 And ASP.NET session sharing](http://stackoverflow.com/questions/1754366/asp3-and-asp-net-session-sharing) – Shadow The GPT Wizard Mar 07 '12 at 08:29
  • @Adriano - Its likely that they are using Session objects to keep them out of the hands of the users just in case its a web facing application or outside access could exist . Cookies leave crumbs .. Session Objects live on the server .. so they are one of the most secure ways to store the data. But you are right ... if security isn't an issue .. hmm what about switching from POST to GET and posting the results in the URL directly and just hashing them out there? Might be easier to manage if security isn't as big of a concern. – easleyfixed Jun 27 '22 at 20:40

2 Answers2

0

On a whim as I have seen this before, but what do you see in the Applications Pools of the IIS Settings for your application? Is it set to .NET CLR Version # or something like that? Because that is what you want for .NET .. but if you want Classic ASP sessions, you need to set that to "NO MANAGED CODE" instead and the Managed Pipeline Mode needs to be set to Classic. Now I don't know how well these work back and forth from NET to CLassic .. but I know if you don't set it to Classic mode your sessions just go poof on you for no reason .. sometimes hold for an hour, sometimes gone on the next click 1 minute later. But long story short, if you have any classic asp .. you need it to be set this way or otherwise your sessions seem to just not work properly because it handles them with .NET techniques otherwise.

APPLICATION POOL SETTINGS

easleyfixed
  • 219
  • 1
  • 13
0

You can give a read to this :

http://msdn.microsoft.com/en-us/library/aa479313.aspx

tetuje
  • 279
  • 3
  • 9