0
votes

I've been tasked with moving an old classic ASP application from an IIS6 to an IIS7 server, and while doing so I should also make it possible for us to make new pages in asp.net (Will be mostly ashx files for ajax requests / api, but I'm sure at some point it will also contain .aspx pages as we move more and more code to asp.net).

While I bet this is tricky already, it has gotten even more complicated due to the way the old classic ASP has been set up.

In reality the whole program is supposed to be a virtual directory, and the IIS Site itself simply holds a file with customer specific information - Meaning that you have to set up the site, write the customer specific information, then add the virtual directory.

That means that the program itself is being programmed and built with what it believes to be the root - but when it's actually being run from the web, it will be /in/a/subdir/ instead, making asp.net throw errors for not being able to find the code-behind class.

My question is: How would you set up a mixed environment between asp classic and asp.net?

1

1 Answers

2
votes

The way I have seen it done the past is to have .NET run in a Virtual Directory inside the root website that is running ASP and letting the .NET virtual directory run in its own App Pool.

So your IIS looks like this:

  • Default Web Site <-- Classic ASP under App Pool 1
    • VirtualDirectory1 <-- .NET under App Pool 2, pointing to .NET files
    • Rest of Classic ASP stuff

I'm not 100% clear on how your current ASP site is setup though, but hopefully this is a start.