My previous post explained that changes that are necessary to run an existing ASP.NET application in the Windows Azure environment. This post explains about using Azure ASP.NET membership and role providers in ASP.NET web application.
1. Download the code asp.net providers for Azure from the MSDN Code Gallery.
Add the downloaded project to your existing ASP.NET Solution and add a reference to the Project as well.
2. Expand your Azure Service project, in this case it is AzureStoreService, expand the roles node and double click the AzureStore node
3.Select the settings tab from properties dialogue window and click the Add Setting option
4. Give the name DataConnectionString for Name property and click ellipsis button to set the value. Select the option Use the Windows Azure storage as shown below
5. Save your changes that you made in AzureService project. Now Open the Web.Config file of your ASP.NET application and add the following element in the file
6. Add the following code in web.config file to use the membership providers
Now the database is ready for the use.
8. Add the following code in Web.Config fie to use the Role provider
9.Right click the compute emulator icon and select Show Compute Emulator UI then you will get the following window where you can restart or suspend the Azure service.
|Share this post :|