我开发了一个 WCF 服务,它使用 Microsoft Sync Framework 2.1。当我在 Windows 7 中测试该服务时工作正常,但是当我在 Windows Server 2008 R2 64 位中托管相同的服务时,它给出了以下给定错误。
找不到类型“MasterSynchronization.MasterSyncService”,作为 ServiceHost 指令中的服务属性值提供,或在配置元素 system.serviceModel/serviceHostingEnvironment/serviceActivations 中提供。
在这两种情况下,IIS 版本都是相同的。我已经尝试安装 Microsoft Sync Framework 2.1 可再发行包以及 32 位和 64 位版本。但没有运气。请建议。
Web.Config文件如下
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<services>
<service name="SynchronizationLibrary.SyncService">
<endpoint address="basic" binding="basicHttpBinding" contract="SynchronizationLibrary.ISyncContract"></endpoint>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>