7. May 2007 20:54
A couple of weeks ago, a customer was having trouble using a WCF service from a client-side ASP.NET AJAX script. Unfortunately for the customer, the current release of ASP.NET AJAX doesn't currently support direct communication with a WCF service. Direct support for WCF was removed for the official release of ASP.NET AJAX, but it is scheduled to be included within the Orcas release coming late this year. Fortunately, there is a temporary solution that allows communication between ASP.NET AJAX and WCF.
Rather than directly accessing WCF from a client-side script, an ASMX web service can be used to wrap the WCF service. The client-side script will communicate with the ASMX web service, and the ASMX web service will forward the request directly to the WCF service. This does result in some additional overhead. However, it provides a clean "forward looking" solution that easily enables adoption of direct WCF communication when Orcas is released. Once the functionality is released, you can simply drop the ASMX wrapper and the client script can directly talk to WCF with minimal effort.
This has likely been covered in other places, but it still seemed like a useful tidbit of information to pass along.
3900b0ff-64f3-433b-b9e0-18c9225aa312|1|3.0
By: Jeff Barnes
Category:
Tags: