1

I have developed asp.net web form application and I have need to call cross domain handler, so for that I have need to 'Enable CORS', but I have no idea about that. I have used 'Enable CORS' with mvc, but not with web form applications,please provide proper suggestion. Thank you in advance

kapil darji
  • 101
  • 2
  • 16

1 Answers1

0
<httpProtocol>
    <customHeaders>
        <add name="Access-Control-Allow-Methods" values="*" />
        <add name="Access-Control-Allow-Headers" values="Content-Type" />
   </customHeaders>
<httpProtocol>

Write this code in web.config file at the root of your application.

  • thanks for your reply. I have set up configuration as per your suggestion, but when I have set authentication mode is Forms in config file then its not working. ` ` Please give me suggestion – kapil darji Sep 14 '16 at 08:39