我正在使用對web服務的服務引用並創建了它的新實例。我創建了一個消息,並試圖發送此對web服務,但我得到這個錯誤:WCF找不到默認端點
Could not find default endpoint element that references contract 'receivePortService.ITwoWayAsyncVoid' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.
現在我部署該應用程序到SharePoint,所以我只是有dll文件。有沒有辦法我可以手動設置代碼中的配置文件的屬性?
receivePortService.TwoWayAsyncVoidClient client = new TaskCompletedHandler.receivePortService.TwoWayAsyncVoidClient();
Message msg = Message.CreateMessage(MessageVersion.Default,"*",XmlTextReader.Create(xmlMessage));
client.BizTalkSubmit(msg);
如何設置endpointaddress和沒有app.config的東西?