Authentication in Business Application in Silverlight 4


Introduction

We all know that Business Application is having its default Authentication. In this article we will see how one can configure the Authentication.

Creating Silverlight Project

Fire up Visual Studio 2010 and create a new Silverlight Business Application Project. Name it as RIAAuthSample.

1.gif
 
The following is the Web Project structure in the solution.

2.gif
 
Now we would configure the ASP.NET configuration for the web project.

To do that, select the web project and then go to Project and select ASP.NET configuration.

3.gif
 
It would open up the Web site administration tool.

4.gif
 
The Security tab contains the list of users and roles to access the web site.

5.gif
 
As you see in above image the list is empty both for Users and Roles.

Let's not create any but run the application.

6.gif
 
As displayed in above image, click on login to give the credentials.

We don't have any user to login to the web site, so let's create one. Click on "Register Now" as displayed below.

7.gif
 
Give appropriate details to fill in the form and press OK to register.

8.gif
 
The following image shows creation of user.

9.gif
 
After you have done the user registration, the system automatically logs you in.

10.gif
 
Now let's refresh the website administration page that you opened previously, go to the security tab and you would see the user and role are changed to list count = 1.

11.gif
 
We can even create users, roles here and Edit existing user as well manage them (delete purposes).

Now if you click on "Show All files" icon you would see that ASPNETDB.MDF is added to the AppData Folder of the Web Project.

12.gif
 
Hope this article is helpful to use the Authentication in Business Application.


Similar Articles