WCF Service - setting IsOneWay=true still results in waiting client

不想你离开。 提交于 2019-12-11 07:24:16

问题


For seme of my service methods, client application needn't wait for any response to be sent over,
So I just decorated these methods with IsOneWay=true, so they look like:

[OperationContract(IsOneWay=true)]
void MethodName(string param1, int param2)

Now, when I call this method from client application, it still seems to wait for the method to complete processing.

Am I missing something?


回答1:


This may not be the case here and I don't know how your particular service is configured, but if you try and close the channel used to call the method then the Close call will block until the operation has completed on the server - some more info in this blog post.




回答2:


Have you updated the service reference?

If your client code does not know that the attribute has been added it will not react to it.



来源:https://stackoverflow.com/questions/2176701/wcf-service-setting-isoneway-true-still-results-in-waiting-client

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!