我做了一個WCF,它從ms sql db和外部WCF中獲取數據。 當我調試它工作正常,但一旦我嘗試它在現實世界中,我得到這個錯誤的服務:WCF參考外部Web服務
類型的未處理的異常「System.ServiceModel.FaultException`1」出現在mscorlib.dll
附加信息:在http://10.11.11.22/AIM/AIMIS處沒有可以接受消息的端點偵聽。這通常是由不正確的地址或SOAP操作引起的。有關更多詳細信息,請參閱InnerException(如果存在)。
一些在app.config的:
<bindings>
<basicHttpBinding>
<binding name="AdapterFacadeBinding" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://10.11.11.22/AIM/AIMIS" binding="basicHttpBinding"
bindingConfiguration="AdapterFacadeBinding" contract="AIMISWS.AdapterFacadePortType"
name="AdapterFacadePort" />
</client>
<services>
<service name="EcoGridIBMExport.CustomerService">
<endpoint address="" binding="basicHttpBinding" contract="EcoGridIBMExport.ICustomerService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8733/Design_Time_Addresses/EcoGridIBMExport/Service1/" />
</baseAddresses>
</host>
</service>
</services>
,並在客戶端應用程序連接我是這樣的:
static void Main(string[] args)
{
CustomerServiceClient client = new CustomerServiceClient();
Console.WriteLine(client.GetMeter());
Console.ReadLine();
client.Close();
}
我在做什麼錯?
'請參閱InnerException(如果存在)以獲取更多詳細信息.'只需在異常處調用'ToString'即可獲得人們需要幫助的內容。它包含異常和所有內部異常的類型,消息和堆棧跟蹤。 – Will
問題不在於您的客戶端連接到CustomerService,而是連接到AIMISWS服務的CustomerService存在問題 –
這是您不會看到的: – TBoy3