Error : Could not load file or assembly ‘System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified.
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.IO.FileNotFoundException: Could not load file or assembly ‘System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified.
Solution :
To resolve this issue before you publish the file make sure you select Copy Local to True from False
If the dll property of the file — copy local is false means the file will not be copied to bin folder while publishing. Set it to true so that file will be copied to bin folder
Screenshot before error:
Solution
This will copy the dlls while publishing to Bin folder