Skip to main content

Microsoft Silverlight

Answered Question Accessing cross domain xml file using an url in silverlight 2 RCORSS Feed

(0)

v-naresm
v-naresm

Member

Member

0 points

5 Posts

Accessing cross domain xml file using an url in silverlight 2 RCO

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)}

Thank you for reading the issue patiently and replying.looking for reply soon

http://livesites.msn-int.com/xml/Config.xml

cross ploicy file format

<?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>

 

 

Regards,

Naresh

amit_pal1979
amit_pal...

Participant

Participant

1150 points

201 Posts

Re: Accessing cross domain xml file using an url in silverlight 2 RCO

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.

v-naresm
v-naresm

Member

Member

0 points

5 Posts

Re: Accessing cross domain xml file using an url in silverlight 2 RCO

Hi,

   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.

Regards,

Naresh

v-naresm
v-naresm

Member

Member

0 points

5 Posts

Re: Re: Accessing cross domain xml file using an url in silverlight 2 RCO

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?

amit_pal1979
amit_pal...

Participant

Participant

1150 points

201 Posts

Answered Question

Re: Re: Accessing cross domain xml file using an url in silverlight 2 RCO

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

 

Please mark the post as 'Answered' if this Answers your question.

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities