>From what I can discover via Google etc, to build a 64 bit wcf service, all referenced assemblies must be 64 bits.
As the assemblies that were supplied when first building the service are located in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0 I assume these are 32 bit versions. I am assuming that one must re-reference using 64 bit equivalents ( see http://blogs.windowsclient.net/sameh/archive/2010/06/13/wcf-4-0-issues-with- iis-7-0-on-x86-and-x64-bit-machines.aspx) . In case that you are targeting .NET 4.0 on x64 platforms, then you need to do the following steps 1. Use the corresponding x64 executables found at "%windir%\Microsoft.NET\Framework64\v4.0.30319" 2. Update your project to reference the x64 DLLs found at "Program Files\Reference Assemblies\Microsoft\Framework" instead of the x86 versions which is referenced by default from "Program Files(x86)\Reference Assemblies\Microsoft\Framework" I am using a third party logging tool. If the assembly is 32 bit, I assume that I need a 64 bit version. However it looks like that running 32 bit applications on x64 architecture is ok. >From http://learn.iis.net/page.aspx/201/32-bit-mode-worker-processes/ One of the performance benefits of the x64 platform is that it increases virtual address space, making more memory available. We recommend that you configure IIS to use a 32-bit worker processes on 64-bit Windows. Not only its compatibility better than the native 64-bit, performance and memory consumption are also better. Does this sound correct or am I fooling myself. Any advise very much appreciated. Regards Peter From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Peter Maddin Sent: Thursday, 9 June 2011 11:16 AM To: 'ozDotNet' Subject: 64 bit wcf service library I have written a fairly simple wcf service library. This will be hosted in a virtual instance of windows server 2008 r2, presumably running IIS 7.5 or better. The server will have 6 cores and 36 GB of memory. It will run 3 virtual web servers each will be bound to 2 cores and have 1/3 of the memory allocated. The system administrator has requested that the web service be 64 bit. The WCF service library is set with a Platform Target of 'Any CPU.' If I set this to x64, did clean and rebuild, it does this ok. The IIS web site chucks a fit however and gives me this error Error 2 Could not load file or assembly 'PathWestDirectServiceLibrary' or one of its dependencies. An attempt was made to load a program with an incorrect format. I removed the web site and created it anew and added my wcf service library but it still does not like an assembly that targets x64. If I change it back to AnyCPU its happy with the format. Looks like I am stuck with it being set to AnyCPU. I am developing on Windows 7 64 bit. Is what I am doing just not possible. Any reason why? Regards Peter Maddin Applications Development Officer PathWest Laboratory Medicine WA Phone : +618 6396 4285 Mobile: 0414 240 307 E-Mail : petermad...@iinet.net.au; peter.mad...@health.wa.gov.au The contents of this e-mail transmission outside of the WAGHS network are intended solely for the named recipient's), may be confidential, and may be privileged or otherwise protected from disclosure in the public interest. The use, reproduction, disclosure or distribution of the contents of this e-mail transmission by any person other than the named recipient(s) is prohibited. If you are not a named recipient please notify the sender immediately.