views:

891

answers:

6

In the process of updating a web app from ASP to ASP.NET, I want to insert one of the new files into the old app to test something - is this an offence against reason?

A: 

Yes.

It's just not a very good way of doing things. But it will work quite well until you'll try to share the session states and so on. Then you'll have to do some extra work.

Ilya Kochetov
It could be usefull if the ASP.NET is going to replace the ASP, but the conversion is done in several steps.
Gamecat
+1  A: 

Yes but they will not share the session memory. I have an old ASP website and have replaced the main page with a asp.net page with a masterpage/content page setup. I use asp.net to send emails instead of the old asp/com components.

One work-a-round the session sharing issue is to create a bridge page that does an exchange of session data using form post or querystring. http://msdn.microsoft.com/en-us/library/aa479313.aspx

Also if you just add an asp page in your existing asp.net application it will not run. You'll need to set up the entire app in IIS so that both the ASP and ASP.NET pages will run like it will on the server.

Brian Boatright
A: 

No, you can't put an ASP.NET file into a classic ASP application - it will not run.

You can go the other way, and put a classic ASP file into an ASP.NET application.

MusiGenesis
A: 

You could have your ASP application post to a ASP.NET page.

Brian G
A: 

The short answer is 'Yes', but it's a very painful experience. The ASP pages and the ASP.Net pages will not share a common session, and hooking the two up is not as easy as it could be.

Joel Coehoorn
A: 

ASP and ASP.NET work fine side by side. I'm surprised by how important people seem to thing session state is. Most new ASP.NET I've grafted into an existing ASP site has no need of any session state stored by the ASP app. Having said that I avoid using session state for most part anyway in either ASP or ASP.NET.

The only tricky thing is to find a common logon mechanism, I do that using a custom session cookie and a database entry.

AnthonyWJones