WCF客户端控制台应用程序部署
假设 serviceUrl 是从 exe.config(IDE 中的 app.config)读取的,
var binding = new WSHttpBinding();
...
client = new ContentServiceClient(binding, new EndpointAddress(serviceURL));
我是否只需要 exe 本身(没有依赖项)和 exe.config 来让该客户端调用其他机器上的服务。我在本地运行服务时生成了服务引用,看起来所有这些文件纯粹是为了从 IDE 进行无参数服务调用。
Assuming serviceUrl is read from exe.config ( app.config in IDE )
var binding = new WSHttpBinding();
...
client = new ContentServiceClient(binding, new EndpointAddress(serviceURL));
Do I just need exe itself ( given no dependencies ) and exe.config for this client to invoke service on other box. I generated service reference when running service locally , looks like all those files purely for parameterless service call from IDE.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要
,是的 - 这就是您在远程计算机上调用服务所需的全部内容。 WCF 运行时和所有内容都是 .NET(3.0 或更高版本)的一部分。
You need
and yes - that's all you need to call a service on a remote machine. The WCF runtime and all are part of .NET (3.0 or higher).