Click here to Skip to main content
12,954,522 members (53,252 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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:

   <allow-from http-request-headers="*">
    <domain uri="*"/>
    <resource path="/" include-subpaths="true"/>

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()
        Dim serviceProxy = New DistrictOfficialsSoapClient()
        AddHandler serviceProxy.GetElecAuthCompleted, AddressOf GetElecAuth_Complete
    End Sub
Private Sub GetElecAuth_Complete(ByVal sender As Object, ByVal args As GetElecAuthCompletedEventArgs)
        If args.Error Is Nothing Then
        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!!
Posted 18-Jan-13 5:38am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 6,539
CHill60 3,490
Maciej Los 3,153
ppolymorphe 2,030
Jochen Arndt 1,975

Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 18 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100