Sync call to WCF Methods
-
Hello, I am using WCF + Silverlight. Can anyone can tell me how to make sync call to WCF methods? Thanks in Advance..
You can't make a synchronous call from Silverlight to WCF. Silverlight demands that the calls are made asynchronously because it runs on the browser UI thread, so you could end up blocking the browser if you made a long running synchronous call. Right - that's the official party line out the way. In reality, you can make synchronous calls, you just can't use the WCF RIA features to do it. My good friend and one of the brightest human beings to walk the planet, Daniel Vaughan, came up with a fascinating method to do just this. You can find details on how to do this here[^].
Forgive your enemies - it messes with their heads
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility