views:

84

answers:

2

Hello, 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 = 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.
+2  A: 

Try setting Copy Local in solution explorer for those assemblies and make sure they are being dropped into the folder's specified in the binding log.

Also, they were probably built using the V2 CLR. If they were, you'll have to enable Mixed Mode binding by adding this to your web/app config

<configuration>
   <startup  useLegacyV2RuntimeActivationPolicy="true">
       <supportedRuntime version="v4.0"/>
  </startup>
</configuration> 
Jaimal Chohan
Thanks Jaimal. Copy Local is set to true for all three of them. And useLegacyV2RuntimeActivationPolicy is already added in web.config. Any other options?
Élodie Petit
A: 

Replaced the 64bit versions of all the three dlls with their 32 bit versions, cleaned Temporary ASP.NET files folder and compiled again. Now works without problems. Thanks for the help.

Élodie Petit