Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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)?

like image 507
Chad Avatar asked Jul 02 '09 18:07

Chad


People also ask

Can you share the state between Classic ASP pages and ASP.NET pages?

NET class that creates a request containing the ASP Session cookie and sends it to an ASP page to retrieve the ASP Session variable and an ASP page that authenticates the request and returns the Session variable, you can share Session state between ASP.NET and ASP apps.

How is dotnet different from Classic ASP?

ASP or also popularly known as Classic ASP developed by Microsoft is first Server-side scripting engine which is used for dynamic generation of web pages. ASP.NET, on the other hand, is a server-side web framework, open-source, which is designed for the generation of dynamic web pages.

What is difference between ASP and ASPX?

ASP runs on IIS. ASPX runs on . Net framework. ASP uses VBScript for its code.

What is Classic ASP application?

Classic ASP is a server-side scripting environment that you can use to create and run dynamic web applications. With ASP, you can combine HTML pages, script commands, and COM components to create interactive web pages that are easy to develop and modify.


2 Answers

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.

like image 131
jdecuyper Avatar answered Nov 11 '22 14:11

jdecuyper


Not a direct way. You could consider using a shared database backend for your session state.

like image 21
mmx Avatar answered Nov 11 '22 14:11

mmx