Dali
Dali

Reputation: 11

a security exception in silverlight

when I want to access other website in silverlight. it throw the security exception.

I look over the related forums, not find the right answer. please help me.

following block is my code:

            RequestState re = new RequestState();
            HttpWebRequest request =(HttpWebRequest)WebRequestCreator.ClientHttp.Create(new Uri("http://www.baidu.com"));
            request.Method = "Get";
            re.request = request;
            request.BeginGetResponse(new AsyncCallback(RespCallback), re);

Upvotes: 1

Views: 128

Answers (1)

jjrdk
jjrdk

Reputation: 1892

Most likely the site that you are trying to send a request to does not support cross domain requests.

You can read more about how to support cross domain requests here - http://msdn.microsoft.com/en-us/library/cc645032(v=vs.95).aspx

Upvotes: 1

Related Questions