I recently ran into with posting Javascript requests to another domain. By default XHR posting to other domains is not allowed.
Following the instructions from htt
Elaborating from DavidG answer which is really near of what is required for a basic solution:
First, configure the OPTIONSVerbHandler to execute before .Net handlers.
You can also do this in web.config by redefining all handlers under
(
then
them back, this is what does the IIS console for you) (By the way, there is no need to ask for "read" permission on this handler.)
Second, configure custom http headers for your cors needs, such as:
You can also do this in IIS console.
This is a basic solution since it will send cors headers even on request which does not requires it. But with WCF, it looks like being the simpliest one.
With MVC or webapi, we could instead handle OPTIONS verb and cors headers by code (either "manually" or with built-in support available in latest version of webapi).