我正试图开发一个简单的WCF服务在64位环境中运行。 我火了VS2010的Windows 7WCF 64位不工作
新方案下 - > WCF项目 - >运行 - >它工作正常。
只要我改变项目的性质,以使其在64位编译,运行它抛出以下异常:
Could not load file or assembly 'WcfService2' or one of its dependencies.
用下面的程序集加载跟踪
=== Pre-bind state information ===
LOG: User = *****
LOG: DisplayName = WcfService2
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: WcfService2 | Domain ID: 4
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:///d:/temp/WcfService2/WcfService2/
LOG: Initial PrivatePath = d:\temp\WcfService2\WcfService2\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: d:\temp\WcfService2\WcfService2\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/806f4cb8/df40e9e2/WcfService2.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/806f4cb8/df40e9e2/WcfService2/WcfService2.DLL.
LOG: Attempting download of new URL file:///d:/temp/WcfService2/WcfService2/bin/WcfService2.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.
我该如何克服这个问题?任何想法?由于
编辑:
的WCF 不编译平台目标设置为AnyCPU后,但我需要,因为我与SharePoint对象和AnyCPU合作,专门设置一个64位编译(或x86)的编译导致了与here(以及网络上的其他地方)中描述的相同的问题和错误。
因此,无论我编译AnyCPU/x86和我从与SharePoint的整合得到一个错误,或者我的目标平台设置为64位和我从WCF错误。
你有没有得到在64位上运行的服务?我有完全相同的问题。 – Josh 2011-09-22 15:39:03
你解决了这个问题吗?请让我知道 – 2012-02-29 11:11:30