I found a way to easily secure any Silverlight application (that is using the Navigation framework), and thought I would share it with the list. To secure your application you only need to put around 15 lines of xaml into MainPage.xaml The syntax is similar to the page authorisation config in an ASP.Net application
<authLoader:NavigationAuthRule Uri="/Views/CustomerPage.xaml"> <authLoader:Deny Users="?" /> <authLoader:Allow Users="*" /> </authLoader:NavigationAuthRule> http://www.davidpoll.com/2010/01/01/opening-up-silverlight-4-navigation-authenticationauthorization-in-an-inavigationcontentloader/ There are two controls: *AuthContentLoade*r will check that the user is allowed to access the page. If they aren't then an UnauthorizedAccessException is thrown. To catch this the AuthContentLoader control is wrapped in a *ErrorPageLoader * control. This is configured to catch the Unauthorized exception and can redirect to a login screen Hope it helps someone -David Burela
_______________________________________________ ozsilverlight mailing list ozsilverlight@ozsilverlight.com http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight