Base solution for your next web application
Open Closed

Error on publishing the angular project on IIs #7354


User avatar
0
nathaliewehbe created

Hi,

I am trying to publish the angular project on IIS but i am facing problem with CORS policy.

ERROR:
Access to XMLHttpRequest at 'http://localhost:8080/AbpUserConfiguration/GetAll?d=1563787668709' from origin 'http://localhost' has been blocked by CORS policy: Request header field abp.tenantid is not allowed by Access-Control-Allow-Headers in preflight response.

and my appsettings.Production.json is :
"App": {
"ServerRootAddress": "http://192.168.20.100:8080/",
"ClientRootAddress": "http://192.168.20.100:80/",
"CorsOrigins": "http://192.168.20.100:80"
}

and I put in the web.config :

 <cors enabled="true"> <add origin="*" /></cors>

Any idea?


14 Answer(s)