Hello,
Having an issue ? The App runs fine in developpment and crashes when deployed.
I'm using ASP.NET CORE & Angular V.8.0.0. ( latest)
From IIS I can start the backend and it runs ok.
But when I launch the app from the browser, here is the error I get this error :
ERROR SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse (<anonymous>) at XMLHttpRequest.o.onreadystatechange [as __zone_symbol__ON_PROPERTYreadystatechange] (main.002842262ec102d6dcb0.js:1) at XMLHttpRequest.I (polyfills.e4561eaaef4f193a51de.js:1) at t.invokeTask (polyfills.e4561eaaef4f193a51de.js:1) at Object.onInvokeTask (main.002842262ec102d6dcb0.js:1) at t.invokeTask (polyfills.e4561eaaef4f193a51de.js:1) at e.runTask (polyfills.e4561eaaef4f193a51de.js:1) at e.invokeTask [as invoke] (polyfills.e4561eaaef4f193a51de.js:1) at b (polyfills.e4561eaaef4f193a51de.js:1) at XMLHttpRequest.m (polyfills.e4561eaaef4f193a51de.js:1)
7 Answer(s)
-
1
Nevermind. My fault!
-
0
Hi christianharo, how did you solve this issue as I am facing the same problem.
-
0
Hi optixdev. My just was a typo on the configuration "appconfig.json file. I was adding a "/" at the end of the remoServicebaseUrl. What cause the client to not find the server.
-
0
Christainharo - Thanks for the reply.
I am still facing the same issue, can you please share/copy the appconfig.json file her?
Thanks ODev
-
0
{ "remoteServiceBaseUrl": "http://localhost:22742", "appBaseUrl": "http://localhost:4200", "localeMappings": { "angular": [ { "from": "pt-BR", "to": "pt" }, { "from": "zh-CN", "to": "zh" }, { "from": "he-IL", "to": "he" }, { "from": "es-MX", "to": "es" }, { "from": "vi", "to": "en" } ], "moment": [ { "from": "es-MX", "to": "es" }, { "from": "zh-Hans", "to": "zh-cn" }, { "from": "vi", "to": "en-gb" } ] } }
-
0
christianharo... Is this server copy or localhost?
-
0
Hi optixdev. My just was a typo on the configuration "appconfig.json file. I was adding a "/" at the end of the remoServicebaseUrl. What cause the client to not find the server.
Good , it resolved my question。cant add ‘/’ at the end of url