I am working on jaydata as client and .net odata as server but when i request Server it gives me error of 501 not implemented and when i search out for it the issue was CORS [Cross Origion Resouse Sharing] is there any way to enable CORS on odata server or IIS ???
my code is simple just create context with service and fetch entites one solution was to put specail config section in web.config
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
</customHeaders>
</httpProtocol>
But this does not solve the issue
Remember i am using odata [RESTFUL] service and jaydata as client
This is because nothing handles the OPTIONS
preflight requests. You'll want to intercept them. See this question on how to do that and a few important notes.
Update: The question I linked assumes a WCF Data Services implementation. If you're using something else, you'll have to edit your question or search for implementation-specific methods yourself.
Use chrome dev tools or firebug or fiddler to see what is happening on the wire. Which browser do you use? Old IE can not handle CORS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With