.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Working with User Names and Roles in Silverlight Applications

Posted By: dwahlin     Posted Date: April 14, 2011    Points: 0   Category :ASP.Net

Security is a key component of applications and something that developers often struggle with to get right. How do you authenticate a user? How do you integrate roles and use them to show or hide different parts of a screen? These and other questions commonly come up as I talk with developers working on ASP.NET and Silverlight applications.

I was recently presenting a workshop on Silverlight at the DevConnections conference in Orlando and had a question from the audience on how I handle security roles in Silverlight applications. Since I had just implemented a security mechanism for a customer I gave a brief response but didn't have a sample application available to share to point people in the right direction. After the workshop was over I put together a sample application to demonstrate one potential approach for accessing user names and roles. I'll walk through the sample application in this post and highlight the key components.

The goal of the post isn't to dictate how to authenticate users since every application has unique requirements. However, I will discuss general techniques for accessing user names and working with roles to block access to views and show or hide controls.


Security Techniques

Silverlight applications can take advantage of Windows and Forms authentication techniques and can integrate user roles in

View Complete Post

More Related Resource Links

Silverlight Security: Securing Your Silverlight Applications


Josh Twist explains the unique challenges developers face in securing Silverlight applications. He shows where to focus your efforts, concentrating on the key aspects of authentication and authorization.

Josh Twist

MSDN Magazine May 2010

Inside Microsoft patterns & practices: Building WPF and Silverlight Applications with a Single Code


This article discusses the Project Linker tool and other techniques to create applications that target both WPF and Silverlight from a single code base.

Erwin van der Valk

MSDN Magazine August 2009

Data Services: Create Data-Centric Web Applications With Silverlight 2


ADO.NET Data Services provide Web-accessible endpoints that allow you to filter, sort, shape, and page data without having to build that functionality yourself.

Shawn Wildermuth

MSDN Magazine September 2008

Adding user to certain roles


I have setup ASP security in my application. I used the following tutorial, just wondering if someone can tell me how i can setup this up to allow the creation of a user?


Can someone tell me where to find or what to search on to find some example of how to add the option for adding users?

I have the above setup and its working, but only because of the accounts i created with my global.asax file.
I need to give the admins access to add a new user. Currently i can search on existing users and update them, but need to add the ability to add a new user.

MVC2 Music Store - How to get store controller - store.aspx working {genre names displayed}



<p>Select from <%: Model.NumberOfGenres %> genres:</p><ul> <% foreach (string genreName in Model.Genres) { %>

<li> <%: genreName %> </li>

<% } %>


MOST PEOPLE WILL BE USING VISUAL STUDIO 2008 sp1, to get this to work change the <%:, ONLY WITH SEMI COLONS, TO <%=

Quick Note: Create Silverlight Applications to Access SharePoint 2010 Data

In this exercise, you will learn how to create Silverlight applications to display SharePoint 2010 lists inside DataGrid controls.

Quick Note: Working with the SharePoint 2010 Ribbon User Interface

Learn to extend the Microsoft SharePoint 2010 ribbon by adding a custom button that executes server-side code.

Module 8: Creating Silverlight User Interfaces for SharePoint 2010 Solutions

SharePoint 2010 integrates closely with Microsoft Silverlight to enable you to build compelling user interfaces that interact with SharePoint data.

Video: Consuming SharePoint 2010 Objects and Data in Silverlight Applications

This video provides an overview of how to build Silverlight applications that access SharePoint data. (Length: 3:50)

Video: Hosting Silverlight Applications in SharePoint 2010

This demonstration shows how to host a Silverlight Application in a Web Part. (Length: 4:17)

Video: Developing Silverlight Applications by Using the SharePoint 2010 Client Object Model

This demonstration shows how to use the client object model from a Silverlight application. (Length: 11:15)

Tracking user logouts in Web applications

Hi,  I have a text file for my asp.net webapplication that I write to using code behind, and I am trying to record in it user activity(username, log in time and log out time). The log out time can be detected when the user presses the log out button and triggers the logout button event, but when the user presses the close button in the browser it is difficult to track user logouts. What is your advise on how to track user log out time and get the duration of user activity at each login? please advise for best approach ...

Checking SQL Server User Roles and Creating SQL Server Users using VB.NET

Hello gurus!Firstly I want to apologies if this question is out of place here.. if someone can direct me to the correct forumn great and Thanks!I have a VB.NET application which uses its own Backend Database (MSSQL Server). I need to distribute this application to sites where there will be an existing SQL Server.So I will need to Create the Database on this server. The Application includes methods for building the database on startup if not already connected to one.However the users windows logon may not have the correct permission to connect and create a Database on the Server. I have a DB Setup form in my application which asks for the Servname, Username, Password and Database name. I have catered for Windows Authentication and SQL Server Authentication within the form - the user makes the choice.Assuming they enter a Username and Password for SQL Server Athentication then I will be trying to connect using this user and create the database on the given server. The following is my outline logic:-                                                                  Create db Process                                                                             |                                                                             |                                                               Check Credentials                                                                   / 

New SP 2010 Installation - Can't Get User Profiles / Outlook / My Site stuff working.

Hello,   I have a new SP 2010 Installation. I did NOT set it up in Standalone mode. My users can log in and create their own My Sites. They can edit them, add content, etc. When using Outlook 2010, they add one another in the People Pane. It shows up under My Site > My colleagues that they are connected. However, in Outlook, the MySite icon in the People Pane has a red X on it. I thought that User Profile Sync Service might be the culprit after reading through various blogs. However, if I go to Central Administration > Manage Profile Service : User Profile Service Application... if I click Configure Synchronization Connections, the page comes up - "The query returns nothing." I try to click "Create New Connection"... I get an error message - Cannot navigate to the requested page while User Profile Synchronization is running. Please wait for the current Synchronization to finish.   OK - I thought that the query returned no results. I don't see the service running... can someone point me in the right direction?

Silverlight ScrollIntoView not working with virtualizing panel.

Hi I have written a custom virtualizing panel which is working great so far. This panel is used on a list box. When I now call ScrollIntoView(item) on the list box, nothing happens. I have implemented the BringIndexIntoView() method on my virtualizing panel but it is never called. Is this a bug in Silverlight?

Integrated SSRS and kerberos working great.But one user gets An unexpected error occurred while conn

I have this one user who can access SharePoint with no problems otherwise but is getting errorAn unexpected error occurred while connecting to the report server When they try to access an SSRS reports I confirmed he has access. Client issue? AD Account issue?Thanks.

Silverlight Development Best Practices at the Montreal User Group

For those in Montreal this week's User Group meeting should be interesting! Evan Hutnick from Telerik will present a technical session on Silverlight: Silverlight Development Best Practices "In this session, we will explore best practices of development with Silverlight.  This will include a look at the current toolset (VS2010/Blend) as well as the different options for architecture and data access (to MVVM or not to MVVM, WCF RIA Services or not, etc.), as well as how you can structure your application for intelligent reuse of styles and resources, making it easier to design a large-scale application with a unified look and feel." Wednesday, September 8th - Montreal .Net Community - 6:30-9pm I'll be there!
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend