Thursday, August 30, 2012

Why data is not showing in Network machines for a silverlight website?

Why data is not showing in Network machines for a silverlight website?

I have a silverlight web application with a WCF service to access a table in sql server DB. In this application, I am showing a List fetched from a table in sql server DB using a WCF service into my silverlight CumboBox.

Notes:- SQLServer DB is in a remote machine. Silverlight website hosted in IIS Version: 5.1 in another remote machine. WCF Service is added as a servicereferance client to the Silverlight website on the same machine.

While I am running the silverlight website in the same machine where it is hosted, its working fine for me and is giving the expected output. But the same website while accessing from other remote machines its showing the website with control having no data in it as shown in the Images.image in the same machine where Silverlight web site hostedimage in the other remote machine connected through LAN

Can any body tell me what might be the problem. I am new to WCF Services so please let me know if I need to share more info in this question.


Update-1:- *clientaccesspolicy.xml*

<?xml version="1.0" encoding="utf-8" ?> <access-policy>     <cross-domain-access>         <policy>             <allow-from http-request-headers="SOAPAction">                 <domain uri="*"/>             </allow-from>             <grant-to>                 <resource path="/" include-subpaths="true"/>             </grant-to>         </policy>     </cross-domain-access> </access-policy> 

Update-2 I tried by adding the crossdomain.xml file to my WCF service project as well as to the root(i.e. http://10.30.10.42:8080/DICOMWebViewer/crossdomain.xml) also, but the issue is still there. Can any body help me to find out the problem please.

crossdomain.xml:-

<?xml version="1.0"?> <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"> <cross-domain-policy>     <allow-http-request-headers-from domain="*" headers="SOAPAction,Content-Type"/> </cross-domain-policy> 

Update-3:- I have gone through Able to see Silverlight content on Local IIS but not remotely RSS, but no luck again. I am still facing the same problem.

Answers & Comments...

Answer: 1

Chances are good you have to configure the crossdomain policy for your setup to work, checkout the following msdn article.

by : Dominikhttp://stackoverflow.com/users/782758

Answer: 2

I fixed the problem by hosting the WCF web service in IIS server. Previously it was in the localhost, that's why remote machines were not able to download the crossdomain policy and client access policy and also the service was completely unknown to the remote machine. Because of what controls were not getting data neither from the SQL Server DB nor from the XML file. Now its working fine. Thank you Dominik for your quick answers.

by : SharpUrBrainhttp://stackoverflow.com/users/384353




No comments:

Post a Comment

Send us your comment related to the topic mentioned on the blog