Sunday, 20 April 2014

Access-Control-Allow-Origin, Configure WCF Cross Domain service

Use this in Your  WebConfig

 <system.webServer>
 <modules runAllManagedModulesForAllRequests="true" />
 <httpProtocol>
 <customHeaders>
 <add name="Access-Control-Allow-Origin" value="*" />
 <add name="Access-Control-Allow-Headers" value="Content-Type" />
 </customHeaders>
 </httpProtocol>
</system.webServer>
 <system.serviceModel>
 <behaviors>
 .
 .
 .
 </behaviors>
 <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
 <standardEndpoints>