Creating RESTful Web Services with WCF 3.5

Posted August 21st @ 2:43 pm by aaron

My inaugural article titled “Creating RESTful Web Services with Windows Communication Foundation” is up at developer.com. Go give it a read, if you dare! I recently spent quite a while digging into the REST implementation in WCF 3.5 (Beta 2): WebGet/WebInvoke, WebOperationContext, WebServiceHost and their ilk. It’s some pretty interesting stuff.

Feel free to make jabs comments on my article here or on the developer.com website… I welcome all feedback! Got questions? I’m happy to answer anything I can, and help research the stuff I can’t.

For the article I put together a working (simple) blog engine service, which was fun. You can download the source on the last page of the article. I got to play around with a glimpse into what LINQ can do–powerfull stuff. Phil Haack was right, implementing a blog engine really is today’s “Hello World”.

Technorati tags: , ,

1 Trackbacks/Pingbacks

  1. Pingback: Unifying Web "Sites" and Web Services with the ASP.NET MVC Framework - Aaron Lerch on January 2, 2008

5 Comments

  1. Scott
    August 23, 2007 at 09:17

    Excellent article, good job.

  2. Matt
    October 15, 2007 at 18:13

    Hi Aaron,
    Great Article, I downloaded the code and tried to get it running on my machine, but it requires IIS. Is there anyway to host the restful service using the built in cassini web server instead of IIS?

  3. aaron
    October 15, 2007 at 21:12

    Thanks Matt!

    If you look under the BlogService solution in the code download, you’ll see a “BlogServiceServer” project. Building and running that project will host the service in a console application - just keep it running and point your browser at the URL that the console window displays.

    Let me know if you run into any problems…

  4. Matt
    October 15, 2007 at 22:28

    I wasn’t running into any problems hosting the service in a console app. Its trying to host it on Cassini that’s giving me a bunch of issues. Its apparently a known issue fixed in RTM.

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1963941&SiteID=1

    I was able to get around this issue by specifying the WebHttp endpoint, but now the next issue is trying to get Custom Validation to work with a webHttpBinding. I cant see to get WCF to call my validate function. Have you had any success in getting custom validation to work with webhttpbinding?

  5. Ravi
    December 19, 2007 at 12:26

    Great REST code, is there way to add a JSONP to the output response?

Leave a comment

OpenID Login

Standard Login

Options:

Size

Colors