Geeks With Blogs
Hani Amr WCF
Preventing faulty callbacks to ruin your WCF service
Hello, I had a problem in one of the tasks, that is when using callbacks with WCF service sometimes the callback faults and causes your service to hang or timeout the request. The solution to this was to callback your client in a different thread and catch the exception, and then return it to the application in a nice way. Here's an example for this: private void YourMethod() { //... Do work //Time to callback one of the clients BackgroundWorker workerThread = new BackgroundWorker(); workerThread.DoWork ......

Posted On Tuesday, April 24, 2012 10:54 AM

Set DispatchRuntime.AutomaticInputSessionShutdown to false "WCF Exception"
Hello everyone, Been a while since my last post. I've had a weird exception that causes the WCF service proxy not to respond after a certain time (10 mins I guess), so thanks to this post I figured out the solution. Solution that worked for me was to enable reliable session on the client application's config file and service host's config like this: <reliableSession enabled="true" inactivityTimeout="00:20:00" /> and that lead to increase from 10 mins to 20 hours :) Cheers ......

Posted On Tuesday, April 24, 2012 10:34 AM

Copyright © H@Ni | Powered by: GeeksWithBlogs.net