Geeks With Blogs

News


Timmy Kokke's Blog

↑ Grab this Headline Animator

Timmy Kokke at Blogged
Timmy Kokke …just sorting my bubbles…

Intro

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.

clip_image002

On the Out-of-Browser settings panel check the “Require elevated trust when running outside the browser” feature.

clip_image004

To check if the application is running with elevated trust you can use the following property:

Application.Current.HasElevatedPermissions

If this property is true the application is running outside the browser and is in full trust mode.

 

Install Application

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.

image

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.

image

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.

 

Technorati Tags:
Posted on Friday, June 25, 2010 9:55 PM Silverlight , C# , dotnetmag | Back to top


Comments on this post: Elevated Trust

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Timmy Kokke | Powered by: GeeksWithBlogs.net