locked
Running multiple versions? RRS feed

  • Question

  • User-1104215994 posted

    Hello,

    Let's say I have 2 versions of asp.net web API in different controllers on the same project. (http://localhost:61217/api/v1/pin/products and http://localhost:61217/api/v2/pin/products ) I would like to know if I deploy my web API on IIS, can I both get requests for V1 and V2?

    Best Regards.

    Tuesday, May 21, 2019 1:50 PM

All replies

  • User753101303 posted

    Hi,

    It should be rather the other way round ie what have you done to handle that properly ? See perhaps https://www.hanselman.com/blog/ASPNETCoreRESTfulWebAPIVersioningMadeEasy.aspx

    If you handled that what happens if you try ? If you have some actual problem it's likely best to just tell us directly about it.

    Tuesday, May 21, 2019 2:32 PM
  • User475983607 posted

    Let's say I have 2 versions of asp.net web API in different controllers on the same project. (http://localhost:61217/api/v1/pin/products and http://localhost:61217/api/v2/pin/products ) I would like to know if I deploy my web API on IIS, can I both get requests for V1 and V2?

    This question is very confusing. 

    If I understand, there are two controllers with different versions of your business logic.   Can you explain why you are unable to invoke two different Web API endpoints?  Are you receiving an error?  Is there anyway you can share the client code and any error? 

    Maybe you're you looking for a library and documentation?

    https://github.com/microsoft/aspnet-api-versioning

    Tuesday, May 21, 2019 3:36 PM
  • User61956409 posted

    Hi cenk1536,

    As you said, you created two separate controllers (work as 2 versions) on same Web API project, if these two controllers/endpoints work well locally and you setup IIS configurations correctly, your API application should also work on IIS after you deployed the project to your IIS server. If you have further questions about your Web API project, please feel free to post back.

    Besides, if you have problems/questions about setup IIS, you can post the questions in IIS forums.

    https://forums.iis.net/

    With Regards,

    Fei Han

    Wednesday, May 22, 2019 3:16 AM