In your opinion, what's the best way to create the server side to a pure Javascript application with ASP.NET?

WCF rendering JSON? IHttpHandler?

**Update**

Like GMail, that runs in the browser (with a lot of Javascript) and submit and receive data with Ajax, for example.