Dan Roth Takes Us on a Deep Dive into Web API

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.

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?

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.

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.

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.

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