There is a ASP.NET Core API service site and an ASP.NET Core Angular site on IIS. They are works perfectly. I had to modify a few things in them and I created another two sites with different names and host names to test the modifications. These two also work perfectly. Now I copied the modified sites and I added the host names of the original sites. Naturally I stopped the original sites. Unfortunately the Angular client always throws a CORS error when it wants to reach the srevice site. I know it is a bit complicated but I do not understand it. Maybe the site name and host name must be equal?
Failed to load resource: the server responded with a status of 502 (Bad Gateway)
Cross-Origin request blocked: The same origin policy does not allow remote resources to be read from http://service.einfoszab.budapest.com/api/config/menu. (Cause: The "Access-Control-Allow-Origin" CORS header is missing).
ERROR Object { headers: {…}, status: 0, statusText: "Unknown Error", url: null, ok: false, name: "HttpErrorResponse", message: "Http failure response for (unknown url): 0 Unknown Error", error: error }