Hi All,
I have a Service Layer object that calls a WCF Service. The WCF Service needs to return data back to the Service Layer Object.
The projects are all .Net 4.0.
I have attached my wcf service and the service Layer object that is trying to consume the wcf service. When I run the wcf Service, the code in the wcf service gets to the callback operation returning channel.
the consumer service, obviously calls the Rates method in the wcf service, and the waitForResponse.WaitOne(); method is called. from the client side it then drops after some time into the exception handler and says that it did not receive a timely response from the service. Even though the service had long gone into the callback statement.
Can anybody see why the OnRatabaseCallback does not get returned to.
Loading
Suthish NairPosted Oct 6, 2011, 2:19 PM
http://final-proj.blogspot.com/2009/09/wcf-timeouts.html
williamPosted Oct 6, 2011, 5:27 AM
I have enabled WCF Tracing on the service, but this doesn't give any indication. I can see that the callback with the data I want to send back to the client has been initiated. But it never gets back to the client.
If you download my code in the original mail, although you cannot run as is without a few changes, you can at least see the config files and the code at either side. Hopefully, someone may see something obvious from just looking at my code.
I have also since posting for now commented out any calls to the background worker object on the wcf service. such that all I have in my method is a reference to the OperationContext and then sending the callback to the client, but it still acts in the same way.
e.g.
void IRatabaseService.Rates(string Data)
{
IRatabaseXmlReturn callback = OperationContext.Current.GetCallbackChannel
callback.OnRatabaseCallback("hello");
}
Suthish NairPosted Oct 6, 2011, 4:32 AM
williamPosted Oct 6, 2011, 3:55 AM
Suthish NairPosted Oct 5, 2011, 1:06 PM
williamPosted Oct 5, 2011, 8:44 AM
This isn't the full solution code. The project itself is huge. The error you are receiving is because this is a third party dll that we are using.
In essence you can comment out the whole of the code in worker_dowork and just place e.Result = "mytext". since I know this bit all works. I gave all the code for completeness, I'm happy with the background worker stuff.
The code returns into the worker_runWorkerCompleted function and then goes into a black hole never returning to the client.
Mamta MPosted Oct 5, 2011, 7:20 AM