Follow these steps to create the credentials that you can use to access your Windows Azure subscription from Visual Studio.
- To add a new set of credentials, open an existing Windows Azure project or create a new one.
- Open a Windows Azure Project Management Authentication dialog. To do this, use one of the following two procedures:
- In Solution Explorer, right-click the Windows Azure project and select Publish.
- In the Publish Windows Azure Application dialog, expand the drop down list labeled Credentials, and then select Add.
Configuring Windows Azure account credentials - Option A
- Add a Virtual Machine Role to the Windows Azure project. To do this, right-click the Roles folder inside the project, point to Add, and then select New Virtual Machine Role.
- In Solution Explorer, double-click the VM Role to open its properties window.
- In the Virtual Hard Disk tab, expand the drop down list labeled Select or create your Windows Azure account credentials, and then choose Add.
Configuring Windows Azure account credentials - Option B
- In the Windows Azure Project Management Authentication dialog, expand the drop down list below the label Create or select an existing certificate for authentication and choose Create.
- In the Create Certificate dialog, set the name to AzureMgmt and click OK.
- Choose the newly created certificate from the drop down list.
Choosing a certificate for authentication
- Now, click the link labeled Copy the full path to store the path to the certificate file in the clipboard.
Copying the path of the generated certificate public key file to the clipboard
Note: Visual Studio stores the public key file for the certificate it generates in a temporary folder inside your local data directory.
- Click OK to dismiss the confirmation message box and then save the path in the clipboard to a safe location. You will need this value shortly, when you upload the certificate to the portal.
Confirmation that the file path was copied to the clipboard successfully
- Now, in the Windows Azure Project Management Authentication dialog, click the link labeled Windows Azure Portal to open a browser window and navigate to the Management Portal.
- At the Management Portal, if you have not already done so, sign in using your Windows Live ID.
- Select the Hosted Services, Storage Accounts & CDN option, click Management Certificates, and then click Add Certificate on the ribbon.
Adding a new management certificate to your subscription
- In the Add New Management Certificate dialog, click Browse, change the file name to the path for the public key (.cer) file generated by Visual Studio that you copied earlier to your clipboard, and then click Open. Click Ok to upload the certificate to the Management Portal.
Uploading a management certificate
- In the Certificates List, click the subscription where you created the certificate and make a record of the subscription ID, located in the Properties pane. You will need it in the next step.
Retrieving your subscription ID from the Management Portal
- Go back to the Windows Azure Project Management Authentication dialog in Visual Studio and paste the value retrieved from the Management Portal into the subscription ID textbox.
Entering your Windows Azure subscription ID
- Provide a name to identify your credentials, for example, MyWindowsAzureAccount, and then click OK.