Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi

I have a little problem with Silverlight (C#)... I want to get the source code (html code) from a site e.g google.com when the user clicks a button..

I can't seem to be able to use the WebClient or HttpWebRequest class due to Silverlight security rules that don't allow cross domain calls (for protection agains XSS and XSRF )

is there a way to get around that, since I have to download the source but the site doesn't have a cross domain request policy to allow it...

hope you understand what I mean..

thx in advance!

Posted
IIRC the target site (e.g. google) needs to allow this cross domain access (this is the same if you are using a flash based app).

 

 

What are you trying to get from google and could you not use their public API instead?

 

sorry if I didn't made my self clear, google.com was just an example, not the actual site I am trying to get the source from...

The site I try to download the source from doesn't have a policy document to allow cross domain calls (to allow cross domain calls there must be a clientaccesspolicy.xml or crossdomain.xml file (policy document) in the root of the sites domain...)

so my question is, is there a way to get around that so I can be able to dl the source from any site?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...