Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4610414
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:07:40+00:00 2026-05-22T01:07:40+00:00

I am wondering whether Silverlight has a security context where you can flag portions

  • 0

I am wondering whether Silverlight has a security context where you can flag portions of the code with [PrincipalPermission(SecurityAction.Demand, Role = "Administrator")].

From all the research I’ve gathered so far is that in order to obtain a “user object” you have to write a service (or use the nasty RIA crap they want to complicate our lives with) and pass back and forth a custom defined user object (which inherits from UserBase object) that is recognizable by both the xaml (silverlight) runtime and the wcf service.

Assuming that this much is correct, how do i restrict access to particular screens within the silverlight app?

How do I set the current security principal to be the same as the user instance returned from the service?

I don’t want to reinvent the wheel, and I was hoping I could use the authorization techniques in ASP.NET/Windows inside silverlight code by decorating screens with PrincipalPermission attribute or the silverlight equivalent.

Any help will be greatly appreciated!
Thanks,

Martin

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T01:07:41+00:00Added an answer on May 22, 2026 at 1:07 am

    As long as the application implements the WebContextBase object in the System.ServiceModel.DomainServices.Client.ApplicationServices.WebContext.WebCon­textBase namespace (from the WCF RIA sdk) than the security context should be valid. The WebContextBase implements the IPrincipal interface which in turn makes the usage of [PrincipalPermission(SecurityAction.Demand, Role = “Administrator”)] attributes possible throughout the code.

    In order to make this work, in the web project of the solution one need to add a AuthorizationDomainService, and implement either the default or custom membership & role providers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wondering whether anyone has any good ideas on optimizing the following code. I
I'm wondering whether anyone here has ever used a skip list . It looks
I was wondering whether one could get the HTML source code from an .swf
Just wondering whether an object can self-destruct. Consider this situation. An object that extends
Just wondering whether an object can self-destruct. Consider this situation. An object that extends
I was wondering whether there is a trick to (easily) incorporate some python code
I am wondering whether I can do the following efficiently in Matlab. Writing a
i was wondering whether i can add Aspect J to a Maven project because
I am wondering whether what I want can be acheived by using Yahoo pipes
I am wondering whether we can declare session.gc_maxlifetime setting in .htaccess for the one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.