I am getting CORS policy error. I am trying to use URL Rewrite plug in. I have IIS 10. I tried the examples(links) below, but it still didn't work. So What can i do more?



1 Answer 1


Long time ago I had that issue too on IIS 10.

Tricks with URL Rewriter and native web.config settings are not working fully.

CORS added in the meanwhile preflight request (method "OPTION" within request headers) which is not supported by default by IIS.

At that period I did a custom WebHttpBehavior to handle all of CORS requests then deployed and configured on each IIS front ends. Unfortunately my source code is obsolete now.

However, you can find a really well implementation of a custom WebHttpBehavior on the GitHub repo cshandler/WebHttpBehaviorExtensions

The installation and settings are pretty straightforward as the documentation is well done.

Just as reference, the source code I did in the past: vherrlein/iis-enablingcors

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.