Using RavenDB with ASP.NET Web API

Since the RC version of ASP.NET Web API came out I was having trouble using it with RavenDB, due to the latest’s JSON.Net version prerequisites. Today I found out that there is a way to use both without having to use the unstable builds of RavenDB server (that support the same versions of JSON.Net as Web API).

You’ll probably want to run your RavenDB server instance on a separated process (not embedded), so you can now use a RavenDB client that supports the latest version on JSON.Net, thus resolving this issue. Then, if you need to configure the RavenDB server itself, you can just use the stable binaries.

RavenDB Client: http://nuget.org/packages/RavenDB.Client/1.0.972

PS: If you still have troubles with JSON.Net’s version, be sure to try RavenDB Client Unstable/pre-release binaries from NuGet. The latest version is at http://nuget.org/packages/RavenDB.Client (select “Include Prerelease” in the Package Manager UI or add the “-Pre” parameter on the console). I’m running the latest unstable client binaries with a stable server build and I had no problems so far.