See the question and my original answer on StackOverflow

WCF (I think starting with version 3.51) has a nice "zero config" feature that integrates easily with IIS. All you have to do is

  • create a JSON aware interface & service
  • create a simple .SVC file in the IIS site.

You don't need to mess with funky .config files :-)

Example .SVC file:

<%@ ServiceHost
 Factory="System.ServiceModel.Activation.WebServiceHostFactory" %>

Example interface & service implementation, something like this:

public class MyService : IMyService
        public string Test(string text)
            return text; // whatever


public interface IMyService
    [WebInvokeAttribute(UriTemplate="Test", // change this accordingly
     ResponseFormat=WebMessageFormat.Json, // change this accordingly
     RequestFormat=WebMessageFormat.Json, // change this accordingly
    string Test(string text);

Here is an extra cool link about all this: WCF Web Services The Easy Way.