This error comes when a web service is request by browser (using
jQuery or JavaScript). Put following httpProtocol
node in system.webServer in Web.config file to resolve this issue:
<system.webServer>
.
.
.
.
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*"/>
<add name="Access-Control-Allow-Headers" value="Content-Type"/>
<add name="Access-Control-Allow-Methods" value="GET, POST, PUT,
DELETE, OPTIONS"/>
</customHeaders>
</httpProtocol>
</system.webServer>
No comments:
Post a Comment