我正在使用对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的东西?