Base solution for your next web application
Open Closed

issue with CORS when hosting on IIS #7126


User avatar
0
alexanderpilhar created

6.9.1, Angular, .NET Framework

After successfully test-hosting our application on Azure for several months, we want to host it on-premises as the application is still under development.

Unfortunately, there seems to be an issue with CORS:

We just changed URLs in appsettings.production.json and appconfig.production.json.

This is what appsettings.production.json looks like:

This is what appconfig.production.json looks like:

Is there anything else we are missing for hosting on IIS?


1 Answer(s)
  • User Avatar
    0
    alexanderpilhar created

    It works! ... No idea what happened ... Closing this now.

    EDIT

    Now I know what happened ... appsettings.production.json is ignored on IIS ... Instead, settings have to be done in appsettings.json. I didn't realise that at first because I was also playing around with web.config at the same time. Also, recycling the app-pool instead of just restarting the site might be useful.