我有一个调用WCF服务的WPF程序。这一切工作正常在我的电脑上,但在客户PC上,我得到以下错误。WCF服务调用导致TypeLoadException
[页脚] [头] 2011-12-20 10:54:29809 [5] WARN Kern.Common.Logging.Logger - 在操作过程中发生 例外,使得结果 - 在错误日志记录无效。有关例外的详细信息,请检查InnerException 。 2011-12-20 10:54:29,928 [5] WARN Kern.Common.Logging.Logger - 内部异常 - System.TypeLoadException:无法加载类型'ChannelBase
1' from assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. at KernMobile.Data.Server.KernMobileWcfService.KernServiceClient.CreateChannel() at System.ServiceModel.ClientBase
1.CreateChannelInternal()at System.ServiceModel.ClientBase1.get_Channel() at KernMobile.Data.Server.KernMobileWcfService.KernServiceClient.KernMobile.Data.Server.KernMobileWcfService.IKernService.BeginLogin(String username, String password, AsyncCallback callback, Object asyncState) at KernMobile.Data.Server.KernMobileWcfService.KernServiceClient.OnBeginLogin(Object[] inValues, AsyncCallback callback, Object asyncState) at System.ServiceModel.ClientBase
1.InvokeAsync(BeginOperationDelegate beginOperationDelegate,对象[] inValues,EndOperationDelegate endOperationDelegate,SendOrPostCallback operationCompletedCallback, 对象userState)
我打开WCF的跟踪,但没有在日志文件中报告的错误。
这里的服务配置:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IKernService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="2147483647" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost/Kern.Server.Service/KernService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IKernService"
contract="KernMobileWcfService.IKernService" name="BasicHttpBinding_IKernService" />
</client>
</system.serviceModel>
任何想法?
确定.NET框架v4.0安装在客户端机器上,并检查所有依赖的dll是否可用? – Rajesh 2011-12-20 15:18:11