Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Use Existing WCF service in Silverlight
2 replies. Latest Post by Bichitra on October 28, 2008.
(0)
Bichitra
Member
3 points
39 Posts
10-28-2008 10:47 AM |
Hi,
I have already a WCF service used in ASP.net application. I want to use this existing service in my silverlight application.
( I added the webreference to add the existing servie it gives warning and doesn't add any binding information in servicerference.clinetcofig file and gives waring service is not compactible with silverlight. I dont want to change the existing service because it is used by different application)
any body can help me to fix this issue?
Thanks
davidezo...
Contributor
5686 points
873 Posts
10-28-2008 10:59 AM |
you have to verify the WCF web.config configuration file: the binding must be set to "basicHttpBinding" (your service could use instead wsHttpBinding which isn't supported by Silverlight).
You also have to put a clientaccesspolicy.xml or crossdomain.xml file like the following on the root of your domain:
clientaccesspolicy.xml
<?xml version="1.0" encoding="utf-8"?> <access-policy> <cross-domain-access> <policy> <allow-from http-request-headers="*"> <domain uri="*"/> </allow-from> <grant-to> <resource path="/" include-subpaths="true"/> </grant-to> </policy> </cross-domain-access> </access-policy>
Check out http://msdn.microsoft.com/en-us/library/cc197955(VS.95).aspx for more information.
10-28-2008 12:34 PM |
Thanks for reply..
I have fixed it..