简体   繁体   English

WCF(4.5)主机中的触发事件

[英]Firing event in WCF (4.5) host

I am trying to get this to work in the latest version of WCF. 我试图让这个在WCF的最新版本。

The problem is that BatServ does not show up for me to use from the service reference that was added. 问题是BatServ不会从添加的服务引用中显示给我使用。 Only IBatServ does. 只有IBatServ可以。 is this because of the latest version of WCF or something else? 是因为WCF是最新版本还是其他版本?

You're trying to fire an event at the host from the client side - and you can't do it directly (the link you pointed out is an event fired at the host from the server side ). 您正在尝试从客户端在主机上触发事件,而不能直接执行(您指出的链接是从服务器端在主机上触发事件)。 The host is potentially on a different computer than the client, so there's no direct way for the latter to access the former. 主机可能与客户端位于不同的计算机上,因此,客户端无法直接访问客户端。 What you can do is to have an operation on the server which the client can call, and that operation can fire the event at the host. 您可以做的是在服务器上进行客户端可以调用的操作,该操作可以在主机上触发事件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM