I've been working my way through Tim Heuer's Silverlight tuturial, in which you set up a basic interface to search Twitter. I started on the tutorial yesterday, completing through Step 3. It all was working fine. Now, though, I can't call Twitter without getting a "System.Security.SecurityException" error in the OpenReadCompleted handler. This applies to running Heuer's own code, as well. I would assume that it's a Cross-Domain Access issue, but that shouldn't be the case with Twitter's search API.
Using Web Development Helper, I see 2 failed GETs to http://search.twitter.com/clientaccesspolicy.xml, followed by a successful read of http://search.twitter.com/crossdomain.xml. That seems normal to me, since the first file exists, and the second doesn't. I'm totally stuck, and being new to Silverlight, don't know what else to try. I'd appreciate any help.
The Twitter call is as follows:
WebClient proxy = new WebClient();
proxy.OpenReadCompleted += OnReadCompleted;
proxy.OpenReadAsync(
new Uri( @"http://search.twitter.com/search.atom?q=abc&since_id=0" ) );
These are the error details:
at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state) at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result) at System.Net.WebClient.OpenReadAsyncCallback(IAsyncResult result)