Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

Silverlight WCF crossdomain Issue RSS

22 replies

Last post Nov 04, 2011 10:45 AM by klibni

(0)
  • kamal.g

    kamal.g

    Member

    2 Points

    1 Post

    Re: Silverlight WCF crossdomain Issue

    Sep 16, 2010 04:22 PM | LINK

    Nice article about this fix.  Apart from the policy file, we have to make sure that virutal path settings.

    http://www.itscodingtime.com/post/Silverlight-to-WCF-Cross-Domain-SecurityException.aspx

    Hope this helps.

  • HFaisal

    HFaisal

    Member

    2 Points

    1 Post

    Re: Re: Re: Re: Re: Re: Silverlight WCF crossdomain Issue

    Oct 15, 2010 09:23 PM | LINK

    Jonathan Shen – MSFT

    Secondly, please check where your WCF is hosted.  If it is non-IIS-hosted WCF services, please take a look at this post.  
    http://blogs.msdn.com/carlosfigueira/archive/2008/03/07/enabling-cross-domain-calls-for-silverlight-apps-on-self-hosted-web-services.aspx.

    Thanks for the answer , 

    but what if this Service comes from Microsoft and you can't change ? I am talking specifically about Microsoft Dynamics GP 2010 Web Services ( legacy ) ... They are non-IIS Hosted and -for sure- Can't be changed to send crossdomain.xml informations ... 

    So what can I do for that ? Is developing "friendly" WCF Services to be used from Silverlight 4.0 or there is another solution ? 

    thanks .... 

  • klibni

    klibni

    Member

    2 Points

    1 Post

    Re: Silverlight WCF crossdomain Issue

    Nov 04, 2011 10:45 AM | LINK

    Had the same problem. Solved it by

    changing the ServiceReferences.ClientConfig

    from

    <client>

    <endpoint address="http://localhost/SampleService/OnlineService.svc

    "binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IOnlineWCFService

    "contract="MyOnlineServiceReference.IOnlineWCFService" name="BasicHttpBinding_IOnlineWCFService" />

    </client>

     To  

    <client>

    <endpoint address="http://10.10.0.25/SampleService/OnlineService.svc

    "binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IOnlineWCFService

    "contract="MyOnlineServiceReference.IOnlineWCFService" name="BasicHttpBinding_IOnlineWCFService" />

    </client>

     

    Now when you access the Silverlight application using the ip address

    http://10.10.0.25/SilverLightApplicationName/Page.aspx

     It works absolutely fine.

    But the same application fails to work when you give the path of the silverlight application using

    http://localhost/SilverLightApplicationName/Page.aspx.

     

    Solved it!! thanks...