WCF Callback Issues
with my project the AppManager i got an error many time when i sent MsgBox to client:
"System.TimeoutException: This request operation sent to http://schemas.microsoft.com/2005/12/ServiceModel/Addressing/Anonymous did not receive a reply within the configured timeout (00:01:00). The time allotted to this operation may have been a portion of a longer timeout. This may be because the service is still processing the operation or because the service was unable to send a reply message. Please consider increasing the operation timeout (by casting the channel/proxy to IContextChannel and setting the OperationTimeout property) and ensure that the service is able to connect to the client."
in some forums a solution was suggested put this attribure above the client implementation class, if it a callback class o/c:
class cClient : IClient
and it worked for them and i do suggest to put it there always since it cant harm.
BUT for me it didnt help, AND they were void methods! so how come the error is about timeout?
then while testing i found out that the server app get stuck the moment i send the msg and get released when the client press OK btn.
the great conclusion:
void or not the server still waits for the method to complete (return), so if you need to do anything that takes time and you dont want the server to wait create a Thread(s) for the job(s).
if after that u want to notice the server that the job is done - thats why you can have the server interface have an operationcontract (da...)