2010-03-17 58 views
0

我正在使用Windows安裝程序來部署我的應用程序。而且我添加了一個自定義操作來訪問遠程服務器的WCF服務。在安裝應用程序時,我發現endpoind沒有發現異常。Windows安裝程序自定義操作調用WCF從遠程獲取值失敗(NoEndpoint發現異常)

ServiceReference.testContractsClient client; 
var wsBinding = new WSHttpBinding(SecurityMode.None, false); 
//End point i take from user input 
EndpointAddress endpointAddress = new EndpointAddress(ctlWebServiceUrl.Text); 
wsBinding.MaxReceivedMessageSize = int.MaxValue; 
client = new ServiceReference.testContractsClient(wsBinding, endpointAddress); 
client.test(); //method call 

如果我連接到局域網(網絡)它工作,相同的安裝程序在所有機器上工作。 只有一臺PC上的Windows XP Professional有問題。

回答

1

我發現問題與代理存在,我們需要設置爲false端點對象的標記usedefaultproxy

相關問題