V
V
Vadim Ivanenko2015-05-04 02:55:24
IIS
Vadim Ivanenko, 2015-05-04 02:55:24

How to completely separate the frontend SPA from the ASP.NET WebAPI backend?

We are writing a study project. We must have one web client and two backends with the same API - one in PHP, the second in ASP-e.
There is a web client Domain.WebClient in the form of SPA on AngularJS. It makes requests to the Domain.WebApi API based on the current URL.
domain.com
domain.com domain.com/app - frontend
domain.com/api - backend
The peculiarity of Domain.WebClient is that it is written exclusively in JS + HTML and is used in two projects as a dependency: the php version of the backend and the asp version backend.
I need to set up an IIS or ASP project so that all requests in which /api is present are processed by the application (api controller), and the rest go to the Domain.WebClient/layout.html file.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kano, 2015-05-04
@supra7sky

You can create one generic application tied to your domain, and inside this application add a couple of virtual applications:
app refers to the web client and
api refers to api .net You can
also use this extension for iis www.iis.net/downloads/microsoft /url-rewrite
With which you can configure so that all requests not related to either api or app are redirected to a static start page

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question