Separate the web api from the main project
Hi everyone,
I am having a solution, in which there are several projects, these hold different types of things, for example one is holding the website and in this I recently did deploy some web api controllers.
So it's something like this: Solution
Project A Project B Project C (this be my front-end project)
Controllers(WebAPI Controllers)
Now what I want is to separate the controllers from my Project C and make a new Project D and put them in, my problem however is, how can I configure it in such way, that I can communicate with from Project C to Project D?
I have CORS enabled, but what happens when I go to deploymode? I cant hardcore the calls from Project C, since they change when on deployment and the WebAPI is on another port, how can I still make it available without hosting a new domain?
Until now the controllers lies under the Project C and I can easily access them using the route 'api/Some' but how to setup a project D with the same behavior?
Thanks for any help
0 comments:
Post a Comment