Failed to load file or assembly "JsonFx.Json" or one of its dependencies. An attempt was made to download a program with the wrong format

I am trying to compile and run a web application containing some external dlls.

The application compiles without errors, but when I run it, I get the following error:

Failed to load file or assembly "JsonFx.Json" or one of its dependencies. An attempt was made to download a program with the wrong format.

The two most common solutions to this problem are to enable 32-bit applications on the IIS server and make sure that the solution does not compile some projects in 32-bit mode and others in 64-bit mode. I tried both of these, but to no avail.

Any help would be greatly appreciated.

Assembly loading schedule:

Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable  C:\Windows\SysWOW64\inetsrv\w3wp.exe
--- A detailed error log follows. 

=== Pre-bind state information ===
LOG: DisplayName = JsonFx.Json
 (Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: JsonFx.Json | Domain ID: 34
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/workspace/<project name>/source/<project name>/
LOG: Initial PrivatePath = C:\workspace\<project name>\source\<project name>\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\workspace\<project name>\source\<Project name>\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/<project name>/b862caa3/ad6832cd/JsonFx.Json.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/<project name>/b862caa3/ad6832cd/JsonFx.Json/JsonFx.Json.DLL.
LOG: Attempting download of new URL file:///C:/workspace/<project name>/source/<project>/bin/JsonFx.Json.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.
+4
2

, JsonFx.Json.dll. , , , .

+1

, IIS Express Visual Studio. 64- 32-, 64- IIS Express.

:

  • : HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\WebProjects
  • , REG_DWORD "Use64BitIISExpress". , .
  • 1 ( = 0).
+2

Source: https://habr.com/ru/post/1544002/


All Articles