I got CORS error after publishing my API and Angular app to IIS even though CORS is enabled and the origins of the Angular app is added. Below is how I resolved this issue.
Just simple, make sure you select Portable for Target Runtime in Publish Settings when you are publishing your API.