WCF客户端控制台应用程序部署

发布于 2024-09-13 19:48:09 字数 312 浏览 1 评论 0原文

假设 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

绾颜 2024-09-20 19:48:09

您需要

  • .NET 3.0 或更高版本
  • 的 EXE 和 exe.config
  • 网络连接

,是的 - 这就是您在远程计算机上调用服务所需的全部内容。 WCF 运行时和所有内容都是 .NET(3.0 或更高版本)的一部分。

You need

  • .NET 3.0 or higher
  • your EXE and exe.config
  • network connectivity

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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文