Thursday, October 15, 2009

Driver For Dual Mode Camera

Business Application example for Silverlight 3. NET and RIA Services. - Part 3: Authentication

Part 3: Authentication

This exercise requires (everything is free and will remain):

1 - VS2008 SP1 (including Sql Express 2008 )
2 - Silverlight 3.0
3 -. NET RIA Services July'09 Preview (for this exercise, this is optional)

The English original is available here: Part 2: Rich Data Query
Application Online is available here: http://www.hanselman.com/abrams/ # / Home

You can download the complete solution here: MonApplication.zip

Today we'll talk authentication.

's note: this session is only a basic understanding of the opportunities offered. NET and Silverlight RIA Services. A further session will be a future article.

Business applications often have access to sensitive data. It is important that you can audit, restrict and control access to your data. Let's see how. NET and Silverlight RIA Services operate to achieve this. Using the model

Silverlight Business Application is super easy ... by default it is connected to the authentication system ASP. NET offers a customizable user management system.

I will demonstrate using forms authentication, you can also use Windows authentication by a slight modification.



For this demo, I'll do demonstration of creating a new user, but if you already have a user base, you can use.

's note: for this session, remember to start the application with CTRL + F5.











Note that we have rules for functional validation.

Now the application knows who you are ...



Note that everything on the user experience on the client is fully customizable as all source code is included in the project. But the default template is not bad for many applications.

Now that we are connected, do something about these user data. For example, let us ensure that only registered users can access data from great employees. Editons class SuperEmployeeDomainService (SuperEmployeeDomainService.cs) on the server to add the attribute RequiresAuthentication . There are other attrubuts as roles and the ability to manage in your code if you want.



Now if we run the application and we do not we connect, we have no data. Note that this validation is done client side for a rich user experience and once again on the server to ensure security.



When we are connected ...



... and when we're not.

0 comments:

Post a Comment