I have an ASP.NET web application hosted on IIS 7. Currently, I access this application by visiting: [http://]//machinename/ApplicationName/Default.aspx.

I want to have multiple versions of the same application hosted in IIS. My goal is to let a user visit urls in the form of [http:]//machinename/ApplicationName/x.y/Default.aspx. So for instance, I want to visit:

[http:]//machinename/ApplicationName/1.0/Default.aspx [http:]//machinename/ApplicationName/1.1/Default.aspx

If the user visits the version in 1.0 they would see the 1.0 version of my application. If they visit the version in 1.1 they would see the 1.1 version of my application. How do I set this up in IIS 7?

link|improve this question
serverfault is probably the wrong place for this questions since you are very likely to be able to do what you want programmatically within Visual Studio. All the answers you're likely to get here will probably involve creating Virtual folders and publishing your respective applications in to them. Try Stack Overflow for a programming type solution. – Lewis Jan 20 at 16:22
@Lewis - this is very much on topic for SF, all of the above can be achieved using the APPCMD tool or in the IIS MMC UI. It's basic IIS7 admin. – Kev Jan 22 at 3:19
Which, if you read my comment fully before the desire to respond with a smart arse comment overwhelmed you, is what I actually said. For your benefit, I'll repeat myself: "All the answers you're likely to get here will probably involve creating Virtual folders and publishing your respective applications in to them." – Lewis Apr 20 at 11:01
feedback

1 Answer

up vote 0 down vote accepted

The good news is that I've done this and it does work.

You have to set up each folder as an "application" and run them in separate App Pools. You can set up one web server instance. Then drill down into it and choose each folder, convert it to an application and create a new Application Pool for each "version" that you want to run. Some web.config settings will conflict with the root settings or might not work in a "folder". You basically have to trim down the web.config manually through trial-and-error. Each time you test the page, it'll show an error page if you have a conflicting or illegal entry.

This recent blog post will help debug web.config inheritance.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.