简体   繁体   中英

WCF Callback is not being executed. Timeout issue?

So I have a client server working with netNamedPipes with WCF on C#.

When I set the callbacks to be OneWay = true , they work, but if I try to make the callback to return a value, they stop working the value is not returned to the server, but the client callback function is called.

Error:

SOURCE: mscorlib TARGET: Void HandleReturnMessage(System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Messaging.IMessage) MESSAGE: Object reference not set to an instance of an object.

Why is this happening? Can be some timeout issue? How can I make this timeout timer bigger on code?(no config file).

Thank you

EDIT: What I do is: My client calls the server, I server method called saves the callback channel and when I need to do the callback (out of that method/function, in other function that does not deppend on that one) I do the callback.

Found the issue. Before the callback, I had a value set to false which was killing the thread and closing the host so the callback was unable to be done.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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