Good Morning,
I am having a peculiar problem where it seems that a Silverlight 4 app running in Internet Explorer is ignoring both the clientacesspolicy.xml and crossdomain.xml. The problem does not occur in Firefox or Chrome.
I am accessing an asmx web service on a client's public facing site. I did not write the service but I do have the ability to tweak or move the clientaccesspolicy.xml file.
In Fiddler, clientaccesspolicy.xml is located and downloaded and the response looks correct. However, then the app goes ahead and also accesses crossdomain.xml, which is also downloaded successfully. When the app then tries to hit the service I get a cross domain error.
Clientaccesspolicy.xml is in the web root and I can browse to it in the address bar of IE. The content of it looks like this:
<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>
I've tried also adding
<domain uri="http://*"/><domain uri="https://*"/>
and explicit access to the domain hosting the Silverlight app. I've also tried changing the the fourth line to
<allow-from http-request-headers="SOAPAction">
I've reduced the Silverlight app to the bare minimum of code required to call the service...
Public Sub New()
InitializeComponent()
Dim serviceProxy = New DistrictOfficialsSoapClient()
AddHandler serviceProxy.GetElecAuthCompleted, AddressOf GetElecAuth_Complete
serviceProxy.GetElecAuthAsync("5")
End Sub
Private Sub GetElecAuth_Complete(ByVal sender As Object, ByVal args As GetElecAuthCompletedEventArgs)
If args.Error Is Nothing Then
MessageBox.Show(args.Result.ToString)
Else
MessageBox.Show(args.Error.Message)
End If
End Sub
I've tested the same code against other asmx web services on other domains and had success, so I don't think it's an IE setting. I've tested it against other services on the same site and had the same problem.
I've tested it on multiple machines. In both the VS internet server and IIS. I've tested it with Fiddler open and Fiddler closed. I've tried it in various versions of IE.
What is missing from the clientaccesspolicy.xml?
Thank you!!