Friday 3 February 2012

MAKING YOUR APPLICATION READY TO DEPLOY TO WINDOWS AZURE

Now, you will prepare your application to run in a Windows Azure hosted service. Your application needs to include a Windows Azure deployment project before it can be deployed to the cloud. The deployment project contains configuration information that is needed to properly run your application in the cloud.
  1. To make your app deployable to the cloud, right click on the ToDoListApp project in Solution Explorer and click Add Windows Azure Deployment Project:
  2. To enable the built-in membership provider you must use the ASP.NET Universal Providers. This provider enables the account management capabilities in your application. In Solution Explorer, right click on ToDoListApp and then click Manage NuGet Packages... (or Add Library Package Reference... in older versions of NuGet):
  3. In the ToDoListApp – Manage NuGet Packages dialog, in the top right corner within the Search Online field, write "universal providers":
  4. Select the "ASP.NET Universal Providers" and click Install. Close the ToDoListApp – Manage NuGet Packages dialog after installation is complete.
  5. In Solution Explorer, open the Web.config file in the root directory of the ToDoListApp project.
  6. Under the <configuration> / <connectionStrings> section replace the DefaultConnection connection stringas shown below.
        <add name="DefaultConnection" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=aspnet_ToDoListApp;Integrated Security=True;MultipleActiveResultSets=True"
          providerName="System.Data.SqlClient" />
  7. To test your application, press F5.
  8. This will start the Windows Azure compute emulator. The compute emulator uses the local computer to emulate your application running in Windows Azure. You can confirm the emulator has started by looking at the system tray:
  9. A browser will still display your application running locally, and it will look and function the same way it did when you ran it earlier as a regular ASP.NET MVC 3 application.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.