Asp – Classic .ASP and .NET .aspx web pages in one ASP.NET Web app

asp-classicasp.net

We have an old web app written in classic ASP. We don't have the resources to rewrite the app.

I know that asp and aspx pages can coexist in the same ASP.NET web app, but it appears as those you cannot share Application and probably Session variables across these two groups of page extension types.

I was hoping to do new development in ASP.NET and to in theory, convert the Classic ASP pages over as we go.

Is there a way to share IIS variables across these two types of web pages (aside from passing information using the query string and forms fields)?

Best Answer

There is no straigthforwad solution for sharing session variables between classic ASP and ASP.NET. I would recommend you to persist sessions into a database, like it is described in this Microsoft Article. This way both ASP and ASP.NET can access session variables.

Related Topic