This is the second article in a series of small articles about what is new in Silverlight 4 and Expression Blend 4. The series is build around a open source demo application SilverAmp which is available on http://SilverAmp.CodePlex.com.
Setting elevated trust
A number of new features in Silverlight 4 require more permission, to gain access to the local file system for example. The elevated trust feature is only in available when running outside the browser.
To enable elevated trust right click the Silverlight project and go to the project properties. Check the “Enable running application out of the browser” feature to get access to the Out-of-Browser settings.
On the Out-of-Browser settings panel check the “Require elevated trust when running outside the browser” feature.
To check if the application is running with elevated trust you can use the following property:
If this property is true the application is running outside the browser and is in full trust mode.
When a user wants install the application from the website on his local machine he right clicks the webpage and selects install. When the application is build without elevated trust the normal “install application” window is shown.
To make sure the user notices there is a risk when installing the application, instead of the normal popup a security warning is shown when an elevated trust application is installed.
So get this security warning a little less scary you’ll have to use a certificate to sign your application. I’ll explain all about signing your applications in a later article.