Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 1881

Set CORS headers in web application

$
0
0

Hello,

We have soap web service app under IIS running in classic pipeline (for now it doesn't work in integrated mode although 32bit applications are enabled ) and we tested successfully ajax calls against this web service. We added following headers to web.config

<add name="Access-Control-Allow-Methods" value="POST,GET,OPTIONS" />
<add name="Access-Control-Allow-Origin" value="http://localhost" />
<add name="Access-Control-Allow-Headers" value="Content-Type,soapaction" />
<add name="Access-Control-Allow-Credentials" value="true" />

Now we want to be able to access web service from multiple origins. I guess only option is to set this in code. We tried to set it in HttpModule but events are not raised for OPTIONS verb?

Does anyone know how this can be solved in integrated and classic pipline?

Thanks.


Viewing all articles
Browse latest Browse all 1881

Trending Articles