0
我已經創建了使用Visual Studio 2010 .NET 4.0的辦公室共享添加。這增加了引用WCF服務。當創建WCF服務客戶端的情況下,我得到下面的異常:.NET C#Office共享添加在WCF服務引用異常
找不到,在ServiceModel客戶端配置單元參考合同「Services.IBusinessLogicLayerMetaData」默認終結點元素。這可能是因爲沒有找到適用於您的應用程序的配置文件,或者因爲在客戶端元素中找不到匹配此合同的端點元素。
我不知道如何解決這個問題。我的app.config看起來像這樣:
<?xml version="1.0"?>
<configuration>
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_IBusinessLogicLayerMetaData" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="1048576000" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
<security mode="None">
<transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://10.181.9.47:8000/DeutscheBank.WindowsServices.DataSOA/BusinessLogicLayerMetaDataService" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IBusinessLogicLayerMetaData" contract="Services.IBusinessLogicLayerMetaData" name="WSHttpBinding_IBusinessLogicLayerMetaData" />
</client>
</system.serviceModel>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>
Add In是部署到客戶機還是虛擬桌面(如Citrix)?我最近有同樣的問題:[WCF VSTO客戶端在win2k8上部署時找不到默認端點](http://stackoverflow.com/questions/6111125/) – Filburt