Description
Hi,
I created a new AspNetCoreWebApplication with Angular in .net core 3.1 (individual accounts).
Without changing any code, I published the app in folder, and hosted it in IIS.
I changed the base href in index.html to /test/
, and added the
"Key": { "Type": "Development" }
in app.production.json.
When starting the app in browser, I get the following error(s):
I have seen that the authorize.service uses
const response = await fetch(ApplicationPaths.ApiAuthorizationClientConfigurationUrl);
fetch command to get something from the server, but the fetch command will not use the base href from angular.
When I change the code to:
const response = await this.httpClient.get<Response>(ApplicationPaths.ApiAuthorizationClientConfigurationUrl).toPromise();
then I get an endless loop and it fails to work.
Changing the
links manually to have test/
in front doesn't help either, because then after
authorize?clientid=....
comes the
error?errorid=....
and then my angular app tries to route to test/home/error which fails.
I do not see how best to fix this. In IIS Express it runs without problems.
Any help is greatly appreciated.