When you move the code from local to another server, you may get an error:
Could not load file or assembly ‘System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified.
This error is usually due to missing or error 4 Microsoft .NET Framework 4 files, the cause may be because when exporting the project from visual studio you did not choose CopyLocal = true leading to error message missing file.
The files are missing error like the attached image, you need to export the options CopyLocal = True then check the bin directory to see if there are enough files.
Usually includes the following files:
System.Web.Http.dll
System.Web.Http.Webhost.dll
System.Net.Http.Formatted.dll
إرسال تعليق
إرسال تعليق