Dan Roth Takes Us on a Deep Dive into Web API

Sign in to queue

Description

In this video, learn about new methods of support for IoC containers, better serialization via the JSON.NET library, the open-sourcing of ASP.NET, and how to submit pull requests. Watch as Dan Roth takes us on a code-centric deep dive into the Web API features and how to use Visual Studio 2012 to leverage those features in your own API development.

Embed

Download

Download this episode

The Discussion

  • User profile image
    Zack

    Can you make the source code for JSON.NET demo available? Also, how do you get the current HttpConfiguration in the Application_Start() method?

  • User profile image
    Shawn

    The parts of the video showing the screen are very blurry. It makes it hard to follow.

  • User profile image
    Mobinul Joarder

    Here is the location of source code:
    http://code.msdn.microsoft.com/Contact-Manager-Web-API-0e8e373d/sourcecode?fileId=60331&pathId=1854154262

  • User profile image
    Ronald

    The page for downloading the sourcecode doesn't seem to exist....

  • User profile image
    RalfP

    Contact Manager Web API (updated on 8/16): http://code.msdn.microsoft.com/Contact-Manager-Web-API-0e8e373d

  • User profile image
    Allen Salinas

    No se puede ver claramente el código en el video.

  • User profile image
    Yasser

    ya ! the video is very blurry.

  • User profile image
    Sohnee

    Great video - got everything I needed to know from it. Thanks guys.

  • User profile image
    anil

    Yeah it's nice and easy to understand.

  • User profile image
    amartynov

    Everything sounded great until you started the cryptic Ninject part. Really do I require all these multipage IoC lambda code to create a WebApi?

    Another question that concerns me a lot is JSONP / CORS support. Will you provide it out of the box or we will have to search the web for JSONPSupportBehavior attributes, etc as we currently do for WCF OData?

  • User profile image
    freebie

    Really really empy! Hahaha.

  • User profile image
    Kobim

    Great video , Thanks .

  • User profile image
    John Farrar

    Is there any way to make the API URI work where we can insert an "app" in the routing path before the controller? My business use case is to create a site that allows us to create different apps that install onto a server application ( web of course ) and not worry about overlapping controller names.

    So your api was...

    /api/contacts/

    ... but I would like to have it like this for say faq(s)

    /api/faq/question/

    The question would be the controller and this would allow for applications to be dropped into the web site like faq, blog, shop, etc. This would work great for open source distributed applications where sub apps can be written off a core application framework.

  • User profile image
    Robert Kaucher

    John,
    In WebApiConfig.cs configure a new route to create a route where the map looks like this:

    config.Routes.MapHttpRoute(
    name: "FAQ",
    routeTemplate: "api/faq/{controller}/{id}",
    defaults: new { id = RouteParameter.Optional }

    I then added a new folder in the Controllers folder called faq. Then added my WebApiController called QuestionsController in the default namespace (MvcApplication1.Controllers) and accessed it via http://localhost:61604/api/Questions and I got my string values.

  • User profile image
    Robert​Kaucher

    @John Farrar:

    There were some typos in my message above...

    In WebApiConfig.cs configure a new route to create a route where the map looks like this:

    config.Routes.MapHttpRoute(
                    name: "FAQ",
                    routeTemplate: "api/faq/{controller}/{id}",
                    defaults: new { id = RouteParameter.Optional }


    I then added a new folder in the Controllers folder called faq. Then added my WebApiController called QuestionsController in the default namespace (MvcApplication1.Controllers.faq) and accessed it via http://localhost:61604/api/faq/Questions and I got my string values. I placed the route above the default route.

  • User profile image
    Pete

    Any chance you can stop making those annoying grunting noises when the guest is speaking.

  • User profile image
    sined

    interesting video 

  • User profile image
    Earl3d

    A good start. We really need a few deep-dives per subject. This is a good broad video. Thanks

  • User profile image
    Chue Flade

    5 attempts to download the High Quality MP4 video all resulted in "Connection closed at byte 106692844" :-(

  • User profile image
    gduncan411

    @Chue Flade: I was able to download that file (IE10, North Central US data center [you can see what data center you're getting the file from via the round icon at the very top of the page, next to the left of Follow Us on Twitter link], high speed non-Microsoft net connection...) So it doesn't look like anything directly related to the file itself at least.

  • User profile image
    MinhVuong​Tran

    Thank the video, it help me so much

  • User profile image
    dudley810

    Can you use WEB API to call phone? if so what is needed to do so.  Brady mentioned something about a phone sdk on the video.

Add Your 2 Cents