I have several WCF services that i want to host on an IIS 7 machine. My clients will POST data to these services in JSON format. Because of this, I will set the Content-Type of my Request to "application/json" as shown here:
serviceProxy.Headers["Content-Type"] = "application/json"; serviceProxy.Encoding = System.Text.Encoding.UTF8; serviceProxy.UploadStringAsync(uri, "POST", "[jsondata]");
How do I ensure that "application/json" content type is supported in my environment? I've noticed that this service works if I change the Content-Type to "application/x-www-form-urlencoded". This leads me to believe that I need to setup support for "application/json" in IIS, but I'm not sure what I need to do.
Can someone please help me out?