Triandh Velchuri Triandh Velchuri - 3 years ago 222
ASP.NET (C#) Question

Could not load file or assembly 'System.Net.Http.Formatting on windows server 2008

In my local machine when i ran my application i am successfully able to load the page and i deploy the same code in windows server 2008 and i am getting the below error

"Could not load file or assembly 'System.Net.Http.Formatting, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified."

visual studio not installed in my server.

I think we need to register that assembly on the windows server 2008. How can i resolve this error on windows server 2008 without visual studio command prompt.

Answer Source

The way I would do it is by installing this nuget package:

Install-Package Microsoft.AspNet.WebApi.Client

which contains System.Net.Http.Formatting (and make sure you deploy it).

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download