Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

CORS errors occur when the client-side code running in the web browser requests data from a domain that is different from the domain of the API server. This is a security feature implemented by web browsers to prevent malicious websites from accessing user data on other websites.

When using Windows Auth on IIS with .Net 6 API, the API server may not correctly handle the CORS headers in the response, resulting in the client-side code being blocked from accessing the data. Kestrel, on the other hand, functions properly because it does not have the same level of security restrictions as IIS.

To resolve this issue in IIS, you may need to configure the API server to explicitly allow cross-origin requests from the client-side code. This can be done by adding the appropriate CORS headers to the response.