Relative Content

Tag Archive for iiscustom-headers

Setting Access-Control-Allow-Origin for multiple serviceroutes via a single web.config in IIS

I have a website that offers 3 serviceroutes that is written in MVC and running under IIS. When I set things like Access-Control-Allow-Origin, Access-Control-Allow-Methods, etc. this is done via the web.config and it sets it for all serviceroutes. Is is possible to set these values for each serviceroute via the web.config via the <httpProtocol><customHeaders> or would have to set these in code per serviceroute and add them as user defined values in the <appSetting><add key>.