0

I am working on a Silverlight 5 application which is able to get data using wcf web services. But once a save or delete is attempted the clientaccesspolicy.xml file is requested. This request happens in the HTTP protocol which the browser then reports Display mixed content javascript popup dialog. The asynchronous call done such as BeginSaveChanges silently fails, does not get an error message back in the callback. Why is the app which was working and getting data via HTTPS, happy as a clam suddenly wants the clientaccess policy file and all comes grinding to a halt?

Before the failure Fiddler shows a successful call to the actual webservice to get data. But when the save/delete call is made, an http call to the root clientaccesspolicy gets redirected to the subdomains clientaccesspolicy.xml.

Fiddler Session Capture

#   Result  Protocol    Host    URL Body    Caching Content-Type    Process Comments    Custom  
285 200 HTTPS   test.application.company.com    /SUBSITE/WebService.svc/Terms()?$orderby=Description...{removed}... 742,658 no-cache    application/atom+xml;type=feed;charset=utf-8    iexplore:16376          
286 302 HTTP    test.application.company.com    /clientaccesspolicy.xml 189     text/html; charset=UTF-8    iexplore:16376          
287 200 HTTP    test.application.company.com    /SUBSITE/clientaccesspolicy.xml 341     text/xml    iexplore:16376          
288 302 HTTP    test.application.company.com    /crossdomain.xml    182     text/html; charset=UTF-8    iexplore:16376          
289 200 HTTP    test.application.company.com    /SUBSITE/crossdomain.xml    170     text/xml    iexplore:16376  

I do not see the actual webserivce call in Fiddler, due to the failure, but I do see it when I run it locally under HTTPS.

Errata

  • The test server I am hitting does have a load balancer in the mix.
  • When I debug this on my local machine's IIS it works and I do see the proper delete call go through with no issues with mixed content all inhttps` per Fiddler.
  • As noted above the website hosting the control is in a level below the primary (default site) as designated SUBSITE above.
  • The context is created by passing in a url of https://test.application.company.com/SUBSITE/WebService.svc instead of using the default in ServiceReferences.ClientConfig.
  • Certificate on test server used above is a self signed cert with problems due to not being trusted.
  • Both the primary and the hosting site have clientaccesspolicy.xml and crossdomain.xml.

    <access-policy>
      <cross-domain-access>
        <!-- Silverlight 3 or higher requires the http-request-headers attribute. -->
        <policy>
          <allow-from http-request-headers="*" https-request-headers="*">
            <domain uri="https://*" />
            <domain uri="http://*" />
          </allow-from>
          <grant-to>
             <resource path="/" include-subpaths="true"/>
          </grant-to>
        </policy>
      </cross-domain-access>
    </access-policy>
    
ΩmegaMan
  • 29,542
  • 12
  • 100
  • 122

1 Answers1

0

The answer was within the load balancer. Once the balancer used the SSL certificate to communicate with the webservices the mixed mode page went away.

ΩmegaMan
  • 29,542
  • 12
  • 100
  • 122