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.

3
  • 1
    So, add test and dev applications? Commented Mar 8, 2016 at 10:56
  • 1
    So, basically "I have no clue about basic IIS configuration"? Make them all separate applications and then set up the separate web.config - finished. Commented Mar 8, 2016 at 10:59
  • IIS Applications, share the shame web.config, can I set them up separate? Commented Mar 8, 2016 at 12:06

1 Answer 1

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/

Sign up to request clarification or add additional context in comments.

2 Comments

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.
You can disable config inheritance - stackoverflow.com/questions/782252/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.