WiX 可以使用 WCF 服务吗?

发布于 2024-09-17 09:14:22 字数 166 浏览 4 评论 0原文

我正在创建一个安装程序,用户必须在其中注册其详细信息。这些详细信息需要通过使用那里的 WCF 服务来传送到服务器。

我不确定 Wix 是否可以直接使用 WCF 服务,但如果不能,自定义操作是否可以获取已插入自定义 WiX UI 窗口中的信息?这样就可以调用WCF服务了。

问候, 达里安

I'm creating an installer in which the user has to register their details. Those details need to go up to a server by consuming a WCF service that is there.

I'm not sure if Wix can directly consume a WCF service, but if not, can a custom action take the information that has been inserted in a custom WiX UI window? That way the WCF service can be called.

Regards,
Darien

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

杯别 2024-09-24 09:14:22

是的,绝对是。 WIX 中没有用于使用 wcf 服务的任何内置自定义操作,但您可以创建自己的操作来执行此操作。现在 WIX 支持托管操作,这真的很容易实现。该操作基本上应该使用代理来使用服务器上的 wcf 服务,并且还应该使用一些 MSI 属性(用户在 UI 中完成)来进行调用。

谢谢
巴勃罗。

Yes, absolutely. There is not any built-in custom action for consuming a wcf service in WIX, but you can create your own action for doing that. Now that WIX supports managed actions, that's really easy to accomplish. The action should basically use a proxy for consuming the wcf service on your server, and it also should use some MSI properties (that the user completed in the UI) for making the call.

Thanks
pablo.

梦与时光遇 2024-09-24 09:14:22

我需要更多地了解您与网络服务的交互。例如,如果您需要调用它并带回一些数据,那么您需要编写 C++ 或 C# 自定义操作。如果您只需要尽最大努力将一些数据发布到服务而不返回数据流,那么您可以编写一个 EXE 并仅从安装中调用它。

另外,请务必考虑如果您的服务器不可用会发生什么情况。这会阻止安装还是可以?

如果您选择编写 C# 自定义操作,请务必在 google 中搜索“DTF - Deployment Tools Foundation”。您会在我的博客上找到大量有关它的文章和技巧。基本上,您创建一个使用 WCF 并为其公开客户端私有 API 的类,然后编写一个与 Windows Installer 交互的自定义​​操作类,并将数据来回传递到您的第一个类。

I need to know more about your interaction with the web service. For example, if you need to call it and bring back some data then you'll need to write a C++ or C# custom action. If you only need to publish some data to the service on a best effort basis with no return data flow then you could get away with writing an EXE and just calling that from the install.

Also be sure to consider what should happen if your server isn't available. Does this block the install or is it ok?

If you choose to write a C# custom action, be sure to google for "DTF - Deployment Tools Foundation". You'll find plenty of articles and tips about it on my blog. Basically you create a class that consumes your WCF and exposes a client side private API for it then you write a custom action class that interacts with Windows Installer and passes data back and forth to your first class.

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