Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
589 views
in Technique[技术] by (71.8m points)

visual studio 2010 - Infamous assembly binding error

I really need help on this because I lost my hopes to correct the problem.

I am using Office Communications Server 64bit libraries. There are 3 dlls I use in the project, Microsoft.Rtc.Collaboration.dll, Microsoft.Rtc.Internal.Media.dll and SIPEPS.dll. I am not sure about Microsoft.Rtc.Collaboration but Internal.Media and SIPEPS are both x64. On the GAC assembly list Rtc.Collaboration shows MSIL under Processor Arhitecture and the others show AMD64.

My project compiles without errors with these references but at runtime I receive the error:

Could not load file or assembly 'Microsoft.Rtc.Internal.Media' or one of its dependencies. An attempt was made to load a program with an incorrect format.

I tried compiling the project with CPU set to Any CPU but nothing changes. With both under x64 and x86 setting I receive this error.

Any help is appreciated.

UPDATE: Below is the assembly binding log.

=== Pre-bind state information ===
LOG: User = CONTOSOelodie
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:UserselodieDocumentsVisual Studio 2010ProjectsTFSprotoMainSourceWebBot.Webin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:UserselodieDocumentsVisual Studio 2010ProjectsTFSprotoMainSourceWebBot.Webweb.config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:WindowsMicrosoft.NETFrameworkv4.0.30319configmachine.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.
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I had this problem with ASP.NET IIS and after trying everything, I enabled 32-bit for my app pool and restarted the application pools. Then it worked.

In the IIS7 Manager: Application Pools -> DefaultAppPool -> Advanced Settings -> Set "Enable 32-bit applications" to true.

Also make sure the correct .Net version is selected.

I also set the ISAPI 64bit to allowed under "ISAPI and CGI Restrictions", but I'm not sure if that helped.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...