Reputation: 5058
I have setup my backend Web API created in VS2015 in the IIS server and I can access it via URL
I have ng-build --prod my frontend angular2 application and served it using http-serve
inside the dist folder which I access via URL
If I access the frontend in my pc, I can access the webapi so I can login. But if I access my frontend from a LAN, I can access the frontend because I can get to the login screen. But as soon as I click the submit button, I get the error of
OPTIONS http://localhost: polyfill.4afb43cdae.....bundle.js:153610/token net::ERR_CONNECTION_REFUSED
. Can you please show me how to do this right. Thank you.
Upvotes: 0
Views: 3444
Reputation: 28077
According to the error message, it seems you have send option request to localhost instead of the 192.168.137.15:53610. I suggest you could check you angular codes to make sure you send the request to right url.
Upvotes: 2