Reputation: 11
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
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