Skip to main content

Microsoft Silverlight

Answered Question Use Existing WCF service in SilverlightRSS Feed

(0)

Bichitra
Bichitra

Member

Member

3 points

39 Posts

Use Existing WCF service in Silverlight

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

Bichitra

 

bichitra kumar pattanayak

davidezordan
davidezo...

Contributor

Contributor

5686 points

873 Posts

Silverlight MVP
Answered Question

Re: Use Existing WCF service in Silverlight

Hi,

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.

Thanks, Davide

Silverlight MVP

Blog Twitter Silverlight Experts

Bichitra
Bichitra

Member

Member

3 points

39 Posts

Re: Re: Use Existing WCF service in Silverlight

Thanks for reply..

I have fixed it..

Thanks

Bichitra 

 

bichitra kumar pattanayak
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities