|This post discusses how to create a WCF Data Service solution by using the Silverlight Business Application template. There are several features that you can work with this Business Application Template by writing little code. This post specifically discusses the authentication mechanisms forms and windows. By Default Silverlight Business Application allows the users to register and login with built in controls.|
This template also gives you navigation ability where you can easily add Silverlight pages for additional functionality. It also enables authentication, roles and profiles.
Creating a Visual Studio 2010 Silverlight Application
1. Select the Silverlight project type
click ok. Notice that the following structure will be created where silverlight pages can be found in Silverlight client project views folder
2. Right click the Silverlight client project and select properties. Notice at the bottom of the project properties of the dialogue box RIA Services link exists between the client and server projects
3. Hit F5 and you will see the home page as below
4. Click on the login link then you will get the following login window
5. Click the registration link from above window then you will see the following window
By default Silverlight uses the Forms authentication. To use the windows authentication
Open the web.config file from Silverlight server project and change the authentication mode as shown below
Open the App.xaml.cs for the App.xaml file and change the code as shown in below
Build and run the application, now you will notice login details with windows authentication.