À l'aide du client web en Silverlight

Je vais avoir un diable de temps à appeler un service RESTful de l'intérieur de silverlight. Je rencontre cette erreur:

{System.Security.SecurityException ---> System.Security.SecurityException: Security error.
   at System.Net.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
   at System.Net.BrowserHttpWebRequest.<>c__DisplayClass5.<EndGetResponse>b__4(Object sendState)
   at System.Net.AsyncHelper.<>c__DisplayClass2.<BeginOnUI>b__0(Object sendState)
   --- End of inner exception stack trace ---
   at System.Net.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
   at System.Net.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
   at System.Net.WebClient.OpenReadAsyncCallback(IAsyncResult result)}

Qui semble être un populaire d'erreur lors de l'utilisation du client web. J'ai mis en place un clientaccesspolicy.xml

<?xml version="1.0" encoding="utf-8" ?> 
  <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>

et j'ai regardé le silverlight dans un violon et cela fait une demande sur le site web et ne obtenir un statut 200 dos.

public void login(string userName, string password)
        {
            WebClient client = new WebClient();
            Uri uri = new Uri(serverURI + "/clientaccesspolicy.xml");
            client.OpenReadCompleted += new OpenReadCompletedEventHandler(login_Complete);
            client.OpenReadAsync(uri);
        }

        private void login_Complete(object sender, OpenReadCompletedEventArgs e)
        {
            byte[] buffer = new byte[e.Result.Length]; //crashes here with exception
            ...
        }

Je suis plus ou moins d'idées. Quelqu'un sait ce que je fais mal? Est-il un problème avec l'exécution de l'silverlight directement à partir d'un fichier://uri?

Mise à jour: j'ai supprimé le clientaccesspolicy.xml fichier et gardé juste la crossdomain.xml fichier en lieu et bingo, tout a fonctionné. Qui me fait croire que l'erreur est dans le clientaccesspolicy fichier mais j'ai copié directement à partir de la microsoft. Ce qui donne?

OriginalL'auteur stimms | 2009-04-20