Reputation: 8362
I'd like some advice about the best way to host an ASP.Net part of what is currently an ASP application.
We have a large complex application written in ('classic') ASP.
Part of it needs to be rewritten (unfortunately it's not practicable to rewrite all of it) and we will use ASP.Net.
(The original app makes no explicit use of the Session object at all)
It seem to me there are two ways to proceed with the hosting of this.
Option 1: Create a new virtual directory and serve the newly redeveloped part of the app from there - linking back and forward as necessary between the ASP and ASP.Net
Option 2: Stay within the existing virtual directory and place the entire ASP.Net app within a sub-directory of the current ASP directory
Clearly Option 1 is 'cleaner' and I have a mild preference to do it that way.
However from a source control and installation point of view Option 2 is probably simpler.
I'd be interested to hear from people who've done Option 1 or Option 2 (or perhaps some other way ?).
Also interested to hear whether there's a problem with either approach I've overlooked .
Upvotes: 2
Views: 1956
Reputation: 3250
No serious implications from a coding point of view. The differences are mostly aesthetic. I lean towards option #2. It allows me the option of having a different IIS configuration just for the asp.net code - in case I'd ever need it in the future.
Upvotes: 1
Reputation: 8625
I did it both ways:
Option2: I had classic ASP application and added new pages in ASP.NET 2 using the same virtual directory, all works fine, but you need to pass session info, I remember I used QueryString for this, you can look at How to Share Session State Between Classic ASP and ASP.NET. If you don't use session it's even easy.
Option1: From the same ASP application I called ASP.NET application (another virtual directory) using links in menu of main application. But in this case it was logically separated part. In this case I passed session info by QueryString too.
So, in conclusion I think it all depends how close logic of this part is connected to logic of main application.
Debugging is easy in case of Option 1. In case Option 2, you can replace page by page.
Upvotes: 1
Reputation: 2763
Long ago (around 3 years back) I did a similar kind of project where the client had a classic ASP site and they wanted to develop new functionality in ASP.NET. I followed approach two where I created another VD within the root to place all my files in there. The advantages were obvious from the source control management point of view. However I had to add an additional step in my setup to set the ASP.NET version for my child VD to make it work. Also sharing session was another issue which I am sure you dont have an issue with as you described.
Upvotes: 2