Monday, May 12, 2008 10:54 AM
by
Hossam
Silverlight and WCF
today i had to make silverlight call WCF service so i made a normal wcf service and try to consume it with silverlight and it didn't work ,so i start the debug jury and it lead to no where ,then i serve the forums , blogs ,and documentation but no solution
you can check on silverlight forum.
http://silverlight.net/forums/p/1119/2597.aspxthen i suspected that maybe silverlight client access policy is a must to connect to web service even in debug mode so i added clientaccesspolicy.xml to my wcf service and it works fine now
the code for clientaccesspolicy.xml :
<?xml version="1.0" encoding="utf-8"?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from>
<domain uri="*"/>
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>