-1

I want to create 4 asp.net web api2 projects under one solution and lets say projects are named P1(UI) P2(UI) P3(UI) P4(Service)

these projects will be deployed to different active directories and I want that all UI projects should use service from P4 and projects from P1-P3 will have only cshtml files.

Please suggest how this can be done i am using VS2015 community edition update 3

1 Answers1

1

Follow these steps:

  1. Create a solution.
  2. Add the 4 web app projects to your solution. (P1 to P4).
  3. Work on your projects. Make sure projects P1 to P3 uses the Web APIs from P4.

    For testing, you can right click on the project > debug > start new instance on P4 before running projects P1 to P3.

    *You can run multiple projects in one solution at the same time by right clicking on the project > debug > start new instance *

  4. Configure a different publish settings for each project. Make sure that the url for P4's Web APIs are properly reflected on P1 to P3.
  5. Publish/deploy your web applications.
jegtugado
  • 5,081
  • 1
  • 12
  • 35
  • Thanks for input can you please let me know how to perform step 3-5 with screenshots please – bhanu singh Aug 15 '16 at 03:52
  • @bhanusingh I'm not aware of a method to screenshot the right click menu in visual studio. Simply right click on the project > debug > start new instance. – jegtugado Aug 15 '16 at 05:11
  • i want to know how to " Make sure projects P1 to P3 uses the Web APIs from P4." which settings do i change for that and of step 4 what needs to be changed – bhanu singh Aug 15 '16 at 05:33
  • @bhanusingh that will depend on your design. Most common approach is to use the web config to store the base url of the server that hosts the web API. Let's say P4's base url is "http://localhost:1132" then P1 to P3 must use "http://localhost:1132" as base url when sending requests. – jegtugado Aug 15 '16 at 05:44