Allowing Silverlight to access a cross domain service without a policy file

I wanted to access a site that provides gaming information ( as an xml string. However, this particular site doesn’t seem to have a policy file which means I can’t use WebClient to access the data. So I thought I’d be clever and use Silverlight 4’s WebControl. So I wrote a quick OOB with elevated trust and sure enough it downloaded the page. However, when you ask for the string of HTML that’s what you get, HTML encoded XML…yuk. It then occurred to me that perhaps WebClient would work now I’m running with elevated permissions. Sure enough it does. So if you’re the position to run OOB with elevated permissions then you can use Silverlight to access a non-policy “web service”.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s