Skip to main content
Home Forums Silverlight Programming Visual Studio & Silverlight Development Tools Accessing cross domain xml file using an url in silverlight 2 RCO
4 replies. Latest Post by amit_pal1979 on October 10, 2008.
(0)
v-naresm
Member
0 points
5 Posts
10-09-2008 9:35 PM |
Hi,
i have a question i am trying to access an xml uisng an URL below where the xml is hosted.i have added the below crossaccespolicy file at the webroot of the IIs. but still i can't able to access the xml.i am working in silverlight2 RCO release. for this new we have to change any new format of access policy file. programtically i am using webclient to send async calling the method by giving the below url as uri input.Is thare anything else or any other way i have to do to acces this file.
error i am getting
{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.DownloadBitsResponseCallback(IAsyncResult result)}
http://livesites.msn-int.com/xml/Config.xml
cross ploicy file format
<
</
Regards,
Naresh
amit_pal...
Participant
1150 points
201 Posts
10-10-2008 1:17 AM |
What type of Cross Domain Access are you trying to achieve?
(1) HTTP>>HTTPS or vice-versa.
(2) File>>HTTP(s) or vice-versa
If it is (1), then it should work fine however (2) is currently not supported in Silverlight because of security restrictions.
Please mark the post as 'Answered' if this Answers your question.
10-10-2008 1:38 AM |
the xml was dropped in one of the virtual folder and client access policy has been kept in web root folder. both ways it http>>http.still i cant able to access the file.Any idea how go around on this.
10-10-2008 1:41 AM |
still i cant able to access here i am calling http>>http only. i have kept the xml in virtual folder and client access policy in web root folder. but still i am facing the same problem.any idea?
10-10-2008 3:14 AM |
Are you using any proxy server in your browser?
What happens if you add the webservice to a trusted zone?
Look into this post and it should resolve this:
http://silverlight.net/forums/p/10944/34765.aspx#34765