SetDefaultHttpConfiguration / GetDefaultHttpConfiguration extension methods enable the getting and setting of a global configuration object that will be used by default by MapServiceRoute unless a specific one is provided

MediaTypeFormatterCollectionExtensions.AddRange enables a more compact way to add formatters

FormUrlEncodingMediaTypeFormatter

Task<T> for Web API operations and sample

Breaking Changes

DelegatingChannel renamed to DelegatingHandler

HttpChannel renamed to HttpMessageHandler

FormUrlEncodingMediaTypeFormatter is moved from the default branch to the WebAPI-Prototype branch as it is not currently part of the core product source. JsonValueMediaTypeFormatter is removed as JsonValue is supported in the box.

IQueryable<JsonValue> is not supported. To return an array, the service should return either JsonArray or JsonValue. We are looking in to IQueryable support.

DelegatingHandler no longer require passing in a channel in the constructor making it more friendly to inversion of control (IoC) containers

New constructor overload on HttpMessageHandlerFactory overload which accepts a Func<IEnumerable<DelegatingHandler>> to allow user code or IoC containers to construct handlers.

IQueryable previously supported case-insensitive matches on operators. In the current drop we only will match on lowercase operators i.e. “$top” but not “$Top”. According to the spec this is correct behavior however we could relax it in the future.

Note: In the preview 4 release, Moles was required to build and run some of the unit test projects. In order to simplify the process of getting started with the Web API source, we have removed the 2 unit test projects which have a dependency on Moles from the Web API solution files. Those 2 projects (Microsoft.ApplicationServer.Http.CIT.Unit and Microsoft.Net.Http.Formatting.CIT.Unit) are available in the source code for you to explore, but they are not in the solution by default, which means that you no longer need to have Moles installed to get started.

Reviews for this release

The integrated test client and support for IoC is excellent. The WebApiConfiguration support makes setup of services simple and intuative.
by Oppositional
on Sep 20, 2011 at 4:25 PM