我有一個調用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