One of the SL app’s that I have developed (http://www.dbschemaeditor.com) calls services that are located on the sames domain… so far so good.
Some weeks ago a user was complaining that in some occasions the application thrown a “Connection failed” message whenever he tried to login, … researching a bit on the issue I found that the user was typing in the url address dbschemaeditor.com (no WWW), what happens in this case? It’s treated as a cross domain call !! (request for clientaccesspolicy.xml and ding dong … error !).
Maybe to solve this you can configure something at IIS level (redirect or whatever), in my case I’m running the app in a shared hosting… I found a quick (and dirty?) solution… add a clientaccesspolicy file (site root) enabling explicitly access to the url dbschemaeditor.com (no WWW):
<?xml version="1.0" encoding="utf-8" ?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="SOAPAction" >
<!-- Just include the same domain without wwww-->
<domain uri="http://dbschemaeditor.com/"/>
</allow-from>
<grant-to>
<resource include-subpaths="true" path="/"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
That worked out for the SL service calls.