Does the WCF Data Services Toolkit support CORS out of the box?
Asked Answered
I

1

1

I'm trying to find a decent solution for cross-domain connections between WCF Data Services and datajs. JSONP works great for GET requests, but I can't POST anything. Does the WCF Data Services Toolkit support CORS out of the box? Are there any resources out there that show how to implement CORS for WCF Data Services?

Impregnate answered 10/12, 2012 at 15:38 Comment(0)
K
2

WCF DS does not support CORS out of the box. I haven't been able to find any other out of the box solutions. It may be possible to add CORS support to a server by creating a message inspector for WCF.

Kick answered 12/12, 2012 at 21:48 Comment(2)
Thank you for your answer. Can you perhaps provide a code sample?Impregnate
Feature request. In the meantime; yes it is possible to use a WCF message inspector. Information, Sample implementation by Fernando Rocha.Carrefour

© 2022 - 2024 — McMap. All rights reserved.