Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3878000
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T22:33:46+00:00 2026-05-19T22:33:46+00:00

I am having some troubles with understanding the circumstances under which Silverlight downloads a

  • 0

I am having some troubles with understanding the circumstances under which Silverlight downloads a clientaccesspolicy.xml file. I have a few complications to the runtime environment that need explaining.

This is an Azure web app, running in full IIS mode in dev fabric. There are two sites defined, App and Admin. Since they are both on port :80, they are accessed via host headers, app.dev.com and admin.dev.com, both of which have entries in my HOSTS file pointing back to 127.0.0.1. Accessing both of the client apps is working fine. Silverlight loads, and hits the RIA services defined, no problem.

Things get tricky when the Silverlight client tries to access a blob from dev storage. The problem has been explained before so I won’t go too deep–bottom line, you can’t put the XML file in the root of the web because of how dev storage works (it goes to http://127.0.0.1:10000/devstoreaccount1/clientaccesspolicy.xml). The solution is a reverse proxy to remap the URL–I’ve done it with a Fiddler rule. What this does is “if a request comes in for 127.0.0.1:11000, modify that request to :10000 and GET that instead,” etc.

if (oSession.host == "127.0.0.1:11000") {
  oSession.host = "127.0.0.1:10000";
}
if (oSession.url == "127.0.0.1:10000/clientaccesspolicy.xml") {
  oSession.url = "127.0.0.1:10000/devstoreaccount1/clientaccesspolicy.xml";
}

This works as far as remapping is concerned; I can hit http://127.0.0.1:11000/clientaccesspolicy.xml in my browser and get the file actually living at 127.0.0.1:10000/devstoreaccount1/clientaccesspolicy.xml:

<?xml version="1.0" encoding="utf-8"?>
<access-policy>
  <cross-domain-access>
    <policy>
      <allow-from http-methods="*" http-request-headers="*">
        <domain uri="*" />
      </allow-from>
      <grant-to>
        <resource path="/" include-subpaths="true" />
      </grant-to>
    </policy>
  </cross-domain-access>
</access-policy>

Then this fails from a Silverlight client accessed at http://app.dev.com:81/default.aspx (which to remind you, is remapped to 127.0.0.1 in HOSTS)

private void DownloadFile()
{
    var sampleUri = new Uri("http://127.0.0.1:11000/devstorageaccount1/mycontainer/myblob.bin");
    var client = new WebClient();
    client.OpenReadCompleted += blobDownloaded;
    client.OpenReadAsync(sampleUri);
}
void blobDownloaded(object sender, OpenReadCompletedEventArgs e)
{
    if (e.Error != null) throw e.Error;
    //throws
}

with exception

System.Security.SecurityException ---> System.Security.SecurityException: Security error.
at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClass5.<EndGetResponse>b__4(Object sendState)
at System.Net.Browser.AsyncHelper.<>c__DisplayClass2.<BeginOnUI>b__0(Object sendState)

Looking in Fiddler, the clientaccesspolicy.xml file was NOT downloaded! I have no idea why, or how to debug it. I can download the blob from my browser. Can anyone explain why this would throw before even downloading the XML file?

Then I tried updating those Fiddler rules:

if (oSession.host == "app.dev.com:10000") {
    oSession.host = "127.0.0.1:10000";
}
if (oSession.url == "127.0.0.1:10000/clientaccesspolicy.xml") {
    oSession.url = "127.0.0.1:10000/devstoreaccount1/clientaccesspolicy.xml";
}

and changing the URL to download to

var sampleUri = new Uri("http://app.dev.com:10000/devstorageaccount1/mycontainer/myblob.bin");

And this one succeeds! The Fiddler capture shows the clientaccesspolicy.xml file downloaded first and the blob second.

Can anyone help explain what’s going on here? In both cases the Silverlight app is being access at http://app.dev.com:81/default.aspx. When it tries to download a blob from http://127.0.0.1:11000 it fails with a SecurityException without first downloading clientaccesspolicy.xml. But when it downloads a blob from http://app.dev.com:10000 it succeeds, first downloading clientaccesspolicy.xml and then the blob.

Thanks for the help, this one has me stumped.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T22:33:46+00:00Added an answer on May 19, 2026 at 10:33 pm

    Traffic to 127.0.0.1 usually skips the proxy, so I would imagine Fiddler simply wasn’t getting the chance to rewrite the URL. You could probably point Silverlight at ipv4.fiddler instead and get it to work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having some troubles understanding and implementing the MVC pattern. I have a
I am having some troubles understanding the object relationships in Django. I wrote this:
I'm having some troubles understanding how Guice's singleton instantiations works. I've read the available
I'm having some troubles understanding MPL placeholders. Could someone please explain me why this
Having some trouble understanding the right approach here. I have a connection to a
I'm having some trouble understanding how codeigniters loading works. Well first you have the
I'm having some trouble understanding this issue. I have a class: class StringProperty {
I'm having some troubles in understanding Git team-working principles. Consider a team of two
I'm having some trouble understanding the rules for array broadcasting in Numpy. Obviously, if
I'm having some trouble understanding a bit of code. I've got 2 classes Company

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.