asp.net core - Getting error when trying to call API inside Web App through another Web App - Azure -


i have 2 web apps, inside same app service. 1 back-end portion (with api on it, using .net core, ssl cert installed) , other 1 front-end (reactts, created using create-react-app).

when try call api method (an auth method) using front-end got message response:

login failed: resource looking has been removed, had name changed, or temporarily unavailable.

-404 error

another fact is, if run ront-end solution locally, can use api (published on web app), normally.

my api url set inside package.json file, proxy.

my first thought cors problem, throws 404 error.

any configuration can on azure, or need change in application allow front-end communicate api?

if publish 2 web applications 1 azure web app, later 1 cover first one. cause first web application can't work. suggest create different azure web apps web applications. choose 1 azure web app plan azure web apps. not add costs except shared plan.

if use shared app plan , don't want increase cost, add virtual directory azure web app. publish second web application virtual directory. create virtual directory, steps below reference.

azure portal -> web app panel -> application settings

enter image description here


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -