I found 2 issues that caused this request to throw a security exception
1) - In this video from Tim Heuer, it turns out that my installation of VS2010 w / Silverlight 4 did not match the final assembly, so I donβt have the option displayed in the "from browser settings" dialog box, in which the "Require increased trust when working for outside the browser. "
In the video above Tim checks this out, so the Silverlight app can talk to the twitter API
But since my application did not have this option, I had to manually edit the XML file to look like this. You can find this xml by properties in the project folder or inside the visual studio directly.
<OutOfBrowserSettings ShortName="TrustedNetworkApp Application" EnableGPUAcceleration="False" ShowInstallMenuItem="True"> <OutOfBrowserSettings.Blurb>TrustedNetworkApp Application on your desktop; at home, at work or on the go.</OutOfBrowserSettings.Blurb> <OutOfBrowserSettings.WindowSettings> <WindowSettings Title="TrustedNetworkApp Application" Height="480" Width="640" /> </OutOfBrowserSettings.WindowSettings> <OutOfBrowserSettings.SecuritySettings> <SecuritySettings ElevatedPermissions="Required" /> </OutOfBrowserSettings.SecuritySettings> <OutOfBrowserSettings.Icons /> </OutOfBrowserSettings>
Pay attention to security settings ** ElevatedPermissions = "Required"
After saving, this is equivalent to checking this, as Tim did in the video.
2) - since I watched this video by Tim, I noticed that you have to debug this outside the browser to make it work. Therefore, install the application and run it outside the browser. This application now works.
I will write a short blog entry to summarize my experience with the network stack under the beta version and a link to it for everyone who is interested.
Update
I finally wrote a blog post about my experience creating a Twitter Twitter client using Silverlight 4, if anyone is interested.
source share