Tuesday, April 26, 2011

Deploying an ASP.Net application on Windows Azure


  1. Setup & Pre-requisites

    1. Signup for Windows Azure Pass using code ‘DPWE01’ (Don’t blame me if this doesn’t work)
    2. Use Management portal to add your public IP to the firewall
    3. Install VS.Net 2010 Ultimate/Prof/Express, Azure SDK 1.4
  2. Migrate Database to SQL Azure 

    1. Upload the database to SQL Azure using SQL Azure Migration Wizard
    2. Change your connection strings in web.config to point to SQL Azure.
  3. Would it work on Azure?

    1. Add Azure Project to the your Solution (that you’re migrating)
    2. Compile & Run locally by choosing the azure project (*.ccproj) as the startup
  4. Configure Azure

    1. Use management portal and create hosted service (select ‘No Deployment’ option) clip_image002
    2. Create a Storage Account
    3. clip_image004
  5. Publish to Azure

    1. Rebuild your Solution in VS.Net 2010 and click ‘Publish’ clip_image006
    2. Create a new certificate clip_image008
    3. Click on View and Save the certificate to a file (*.cer file)
      • One of the best practices is to create a ‘Solution Folder’ in your Solution and place these files there. This ensures your certificates are source controlled. Note there’s no way to download a certificate back (as of this writing) from Azure Management Portal clip_image010
    4. Upload the certificate to Management Certificate section in the management portal

    5. From management portal get your subscription ID (available in the properties of the root node called Subscription)  clip_image014
    6. It should authenticate and the Storage account dropdown should list the accounts you’ve created before. Select the account shown.
    7. Click on remote configure linkclip_image016
    8. Create another certificate for remote access
    9. Click on View and save the certificate with Private key (the password you provide here will be needed when you upload the certificate to Azure portal) (*.pfx) clip_image017
    10. Upload the certificate under Certificate Folder under your Hosted Service clip_image019
    11. Click ‘OK’


No comments: