Creating a RESTful JSON service in WCF…

…is harder then I thought.  I finally got it working but I had to merge the “How To” advice from two different sources:


My actual steps were:

  1. Create a new service from the online template:

    Restful service

    This got me pretty far, and I was able to deploy my service to my local IIS, but the result always returned XML.  Even when I specified JSON as the return type. So…

  2. To get the result to return JSON you need to:


After these 2 changes (and some tweaking to the global.asax file to modify routes) my service was off to the races!

This entry was posted in c#.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s