0

I need to create 3 separate and independent versions of my ASP.NET WEB API and host them all at the same port and in the same IIS.

So, let's assume that my current API runs at:

http://xxx.xxx.xxx.xxx/api

I need to replicate it to

xxx.xxx.xxx.xxx/test/api

xxx.xxx.xxx.xxx/dev/api

but it is very important that each one will have it's own configuration on IIS. The reason for that is that I want each "version" of the API to have a different connection string.

Of course this will have to be done with out any change in my current code, just via IIS setup.

ekad
  • 14,436
  • 26
  • 44
  • 46
DimBarn
  • 1
  • 2

1 Answers1

2

You can create applications under an IIS site to accomplish this. You can even use WebDeploy to deploy them all. Follow this blog post -

http://dotnetcatch.com/2016/03/03/simple-service-versioning-with-webdeploy/

chief7
  • 14,263
  • 14
  • 47
  • 80
  • Thank for the answer, unfortunately the applications share the shame web.config and that means also the same connection string. So this is not the solution. – DimBarn Mar 08 '16 at 11:56
  • 1
    You can disable config inheritance - http://stackoverflow.com/questions/782252/avoid-web-config-inheritance-in-child-web-application-using-inheritinchildapplic – chief7 Mar 08 '16 at 12:04