Running multiple versions on the same .NET website

asp.net-mvcweb-api

I have a website (which is actually mainly a Web API site) and I'd like to be able to simultaneously access multiple versions of it.

What I'm currently doing is creating a new website for each version under IIS and referring to sync2.site.com, sync3.site.com etc.

This solution is not very scale able nor maintainable.

How to quickly add more "versions" of this app and access them using something like sync.site.com?version=3?

Best Answer

At my job we do this currently fairly easily just by putting each version under it's own application folder in IIS, so we have URIs like:

http://SomeServiceBox/Service/v1.0/
http://SomeServiceBox/Service/v1.1/
http://SomeServiceBox/Service/v2.0/
http://SomeServiceBox/Service/v2.3/

Works just fine for us. I can only suggest this until you explain why you wouldn't already be doing such... I'm guessing there's something in the way your service is put together that makes such an approach non-functioning otherwise you would have already done this.

Related Topic