Thursday 16 August 2012

Visual Studio 2012: System.FormatException: The format of value 'application/json; charset=utf-8' is invalid.

After installing Visual Studio 2012 RTM over Visual Studio 2012 RC one of my Web API start failing with error:

Server Error in '/' Application.
--------------------------------------------------------------------------------

The format of value 'application/json; charset=utf-8' is invalid. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.FormatException: The format of value 'application/json; charset=utf-8' is invalid.

Source Error: ...

Solution is simple - just update NuGet API packages (Microsoft ASP.NET Web API Client, Web API Core, ...)  it can be done by UI or runing following command:

PM>Update-Package

Probably updating to latest version is also good for other packages like EntityFramework, ...
The Microsoft Visual Studio .NET logo.
The Microsoft Visual Studio .NET logo. (Photo credit: Wikipedia)
Enhanced by Zemanta

No comments:

Post a Comment