Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7063573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:43:46+00:00 2026-05-28T04:43:46+00:00

I currently have a WCF web API that I have split into two versions.

  • 0

I currently have a WCF web API that I have split into two versions. The first version runs at api.mysite.com. The second is currently not published to production.

I would like a way to publish the second API such that requests to the first version are non-interrupted. My ideas would be to add a x-api-version header and internally route the request to the designated API. If there is no header, then default to version 1. I considered adding /v1 or /v2 to the beginning of the path to delimit the version such that a request to v1 or v2 might look like:

http://api.mysite.com/v1/authentication/login
http://api.mysite.com/v2/auth/login

The only caveat is that requests without the version must work and default to version 1 (or whatever version I specify).

Although this sounds good (to me at least), I’m not sure on what the recommended way of implementing this would be. I know that I could always do some sort of reverse proxy but, I’m hoping that my solutions can be a programatic one. The less configuration that is required on the part of the server, the better. If anyone has any ideas or links to blogs/tutorials, that would be fantastic!

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T04:43:48+00:00Added an answer on May 28, 2026 at 4:43 am

    Ok, I enjoyed the answers that I have received so far (thank you both) but, it didn’t quite solve my problem given the constraints and goals that I have with my API. So, I wanted to detail the solution that I have found and plan to use.

    To start, I am versioning my API via the URI. This is to mean that various versions of the API will look like:

    http://api.mysite.com/authentication/login
    http://api.mysite.com/v1/authentication/login
    http://api.mysite.com/v2/auth/login
    http://api.mysite.com/v3/auth/letmeinplease
    ... you get the point ...
    

    The important thing to note here is that if I do not include a version number, then I default to version 1. This will be my current setup however, it could just as easily default to the latest version, latest stable, etc.

    Here we go. I created a folder in which the application will live (wwroot/api). Inside that folder I created folders for all of the versions: v1, v2, etc. Now, in IIS (7.5 for me) I created a new project which had an application root of wwroot/api/v1. Then I added each version folder (including v1) as a sub-application. This allows me to version the API via the URI (as seen above) however, there is a caveat.

    Web.config inheritance can really be a pain. So, I made sure to disable it for all of my api versions. A reference on how to do this can be found here. With that exception, everything works like a charm! 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem with an Api I'm currently developing with WCF Web Api,
Currently I have a web service (WCF) that exposes methods that are set to
I have several resources that I'd like to expose using the WCF Web API.
I'm building a web api using WCF web api preview 6, currently I'm stuck
I currently have a web service built on WCF. It's still in its infancy,
I'm currently writing a WCF web service that uses LINQ to SQL to fetch
I currently have a wcf service library project that includes my service contract &
I have a silverlight 2 beta 2 application that accesses a WCF web service.
I currently have a large set of ASMX web services that log the incoming
I have build a wcf web service that simply provides MS Dynamics SQL data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.