Web Camps TV

Dan Roth Takes Us on a Deep Dive into Web API

Download this episode

Download Video

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

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • 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?

    • Shawn

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

    • Mobinul Joarder

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

    • Ronald

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

    • RalfP

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

    • Allen Salinas

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

    • Yasser

      ya ! the video is very blurry.

    • Sohnee

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

    • anil

      Yeah it's nice and easy to understand.

    • 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?

    • freebie

      Really really empy! Hahaha.

    • Kobim

      Great video , Thanks .

    • 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.

    • 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.

    • 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.

    • Pete

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

    • sined

      interesting video 

    • Earl3d

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

    • Chue Flade

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

    • 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.

    • MinhVuong​Tran

      Thank the video, it help me so much

    • 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.

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.