We have an 3 layer architecture of ASP.Net application which builds with SQL back end and running in Production for last 2 years.
Now we plan to start develop Version 2 of that application by expose data through Web-API. So, we are busy creating the POC for that architectural implementation.
Problem is, we have an existing solution with 3 projects(ASP.NET+BAL+DAL). So, I planned to replace DAL with Web-API because it itself contains Models to interact with back end Database.
I have created a separate solution for Web-API. In my POC, Web-API runs in separate port(ex:localhost:122) & My ASP.NET application runs in with default port(ex:localhost:80). From my ASP.NET application, while I call the Web-API controllers its not returning results. But while checking the Web-API like "http://localhost:122/api/Products" i'm getting the responses.
While seeing the sample Architectures from google, People introduce "Service Layer" in the main(ASP.NET+BAL+ServiceLayer) solution and keep calling that service layer will internally call the original(withich connects with DB) Web-API. Is that only way of doing it ?
Please correct me if my assumptions are wrong.