I\'m having some trouble getting jquery to post some json data to a rest method I have on my WCF service.
On the WCF side, here\'s the operation contract:
I'll just post a short answer that helped me, because other answers didn't.
What you need to do:
Add this to web.config:
Add this to Global.asax.cs (if you don't have this file in your solution, then create it by: Add new item => Visual C# => Global Application Class (default name is "Global.asax")):
protected void Application_BeginRequest(object sender, EventArgs e)
{
if (HttpContext.Current.Request.HttpMethod == "OPTIONS")
HttpContext.Current.Response.End();
}