臭名昭着的程序集绑定错误

Élo*_*tit 61 64-bit visual-studio-2010

我真的需要帮助,因为我失去了纠正问题的希望.

我正在使用Office Communications Server 64位库.我在项目中使用了3个dll,Microsoft.Rtc.Collaboration.dll,Microsoft.Rtc.Internal.Media.dll和SIPEPS.dll.我不确定Microsoft.Rtc.Collaboration,但Internal.Media和SIPEPS都是x64.在GAC程序集列表中,Rtc.Collaboration显示处理器Arhitecture下的MSIL,其他显示AMD64.

我的项目编译没有错误与这些引用,但在运行时我收到错误:

无法加载文件或程序集"Microsoft.Rtc.Internal.Media"或其依赖项之一.尝试加载格式不正确的程序.

我尝试使用CPU设置为任何CPU来编译项目,但没有任何变化.在x64和x86设置下,我收到此错误.

任何帮助表示赞赏.

更新:下面是程序集绑定日志.

=== Pre-bind state information ===
LOG: User = CONTOSO\elodie
LOG: DisplayName = Microsoft.Rtc.Internal.Media
 (Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Microsoft.Rtc.Internal.Media | Domain ID: 9
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:/Users/elodie/Documents/Visual Studio 2010/Projects/TFS/proto/Main/Source/WebBot.Web/
LOG: Initial PrivatePath = C:\Users\elodie\Documents\Visual Studio 2010\Projects\TFS\proto\Main\Source\WebBot.Web\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\elodie\Documents\Visual Studio 2010\Projects\TFS\proto\Main\Source\WebBot.Web\web.config
LOG: Using host configuration file: 
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/root/e3d82f59/764fa8c3/Microsoft.Rtc.Internal.Media.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/e3d82f59/764fa8c3/Microsoft.Rtc.Internal.Media/Microsoft.Rtc.Internal.Media.DLL.
LOG: Attempting download of new URL file:///C:/Users/elodie/Documents/Visual Studio 2010/Projects/TFS/proto/Main/Source/WebBot.Web/bin/Microsoft.Rtc.Internal.Media.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.
Run Code Online (Sandbox Code Playgroud)

Ali*_*ned 62

我在ASP.NET IIS中遇到了这个问题,在尝试了所有内容之后,我为我的应用程序池启用了32位并重新启动了应用程序池.然后它奏效了.

在IIS7管理器中:应用程序池 - > DefaultAppPool - >高级设置 - >将"启用32位应用程序"设置为true.

还要确保选择了正确的.Net版本.

我还将ISAPI 64位设置为"ISAPI和CGI限制"允许,但我不确定这是否有帮助.

  • 非常感谢您的即时修复.它困扰了我好几个小时. (4认同)
  • 我想知道您的行动是否缺少一个步骤。这是我所做的(请注意额外的DefaultAppPool)应用程序池-> DefaultAppPool>高级设置->将“启用32位应用程序”设置为true。DefaultAppPool是用于有问题的应用程序的一个。 (2认同)

Kab*_*oft 58

在我的情况下,我得到了这个问题,因为我正在使用IISExpress运行为x64编译的Web项目.我通过检查Visual Studio中的以下设置来解决此问题:

工具| 选项| 项目和解决方案| 网站项目| 使用64位版本的IIS Express

希望这可以帮助其他人处理同样的情况和问题


Élo*_*tit 18

用32位版本替换了所有三个dll的64位版本,清理了Temporary ASP.NET files文件夹并重新编译.现在没有问题.谢谢您的帮助.