Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


share|improve this question
up vote 1 down vote accepted

make sure the proper version of the framework is running in the application pool. I believe this requires framework 4.0 WCF

share|improve this answer

To add a MIME type to IIS:

  1. In IIS Manager
  2. Go to the server level
  3. In the IIS group, double-click the MIME Types icon.
  4. In the Actions area, click Add and fill in the dialog.

In your case though, this may not be a required step--I'm not sure. It is possible that you don't have the WCF framework installed or configured correctly on the server. Check your logs for any errors and please update the question with any relevant entries.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.