Base solution for your next web application
Open Closed

A little confused about ABP WebAPI. #27


User avatar
0
holobyte created

Hey,

Just ran your example application and I see that there's only one site running on IIS express and it's for the AngularJS/MVC project. This makes me wonder how does the MVC project reaches the WebAPI project, which leads to a couple other questions:

  • How could I open the WebAPI project for third party applications to consume?
  • How should I proceed in order to host the WebAPI site in one server and the AngularJS/MVC in another server?

Thanks!


1 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    Both of MVC and Web API runs in same application in the sample project. See SimpleTaskSystemWebModule class:

    [DependsOn(typeof(SimpleTaskSystemDataModule), typeof(SimpleTaskSystemWebApiModule))]
        public class SimpleTaskSystemWebModule : AbpModule
        {
            ...
    

    It DependsOn SimpleTaskSystemWebApiModule. Thus, ABP loads web API module and it registers Web API services.

    You can serve Web API in a different server. Even you can host web API in a Windows Service or Console Application rather than IIS. Since it's easy but a little long and not ABP-related topic, please search web for it.