10 out of 16 rated this helpful Rate this topic

Using Remote Desktop with Windows Azure Roles

The Windows Azure SDK 1.3 adds the ability to use Remote Desktop Services to access Windows Azure roles. Visual Studio lets you configure Remote Desktop Services from a Windows Azure project. To enable Remote Desktop Services, you must create a working project that contains one or more roles and then publish it to Windows Azure.

Important noteImportant

This ability to access a Windows Azure role is intended for troubleshooting or development only. The purpose of each virtual machine is to run a specific role in your Azure application and not to run other client applications.

To enable Remote Desktop Services

  1. Open Solution Explorer, right-click the name of your project, and then click Publish.

    Publish menu
  2. The Deploy Windows Azure project dialog box appears. At the bottom of the dialog box, click the Configure Remote Desktop connections link.

    Deploy Windows Azure dialog box
  3. The Remote Desktop Configuration dialog box appears. Click Enable connections for all roles.

    Important noteImportant

    Visual Studio is designed to enable or disable Remote Desktop Services for all roles in your project. However, it will write remote desktop configuration information for each role. If you manually modify this information to disable Remote Desktop Service for some roles and not others, Visual Studio will no longer be able to modify the configuration and will display a dialog box that communicates this information.

  4. You can select an existing certificate from the drop-down list or you can create a new one.

    NoteNote

    The certificates that are needed for a remote desktop connection are different to the certificates that are used for other Windows Azure operations. The remote access certificate must have a private key.

  5. To create a new certificate select <Create> from the drop-down list.

    The Create Certificate dialog box appears.

    1. Type a friendly name for the new certificate and then click OK.

    2. To upload this certificate to the Windows Azure Platform Management portal, click View.

    3. Click the Details tab.

    4. To copy this certificate to a file, click Copy to File

    5. To export a private key for this certificate, select Yes, export the private keyand then click Next.

    6. To select the default export file format, click Next

    7. To protect this private key using a password, type a password. Confirm this password and then click Next.

    8. To obtain the path for this certificate file to use to upload the certificate, click Browse and copy the path shown in the Save As dialog box. Type the name of the file for this certificate in File name. Click Save, then click Next.

    9. To create this file, click Finish.

  6. Using the Windows Azure Platform Management portal, upload the certificate for the hosted service that you will connect to with Remote Desktop Services. To upload the certificate, you must use the path for the certificate file that you obtained from the previous steps. See How to Add a New Certificate to the Certificate Store.

    Important noteImportant

    If you attempt to deploy and you have not uploaded your Remote Desktop certificate to Windows Azure, you will receive an error message and your deployment will fail.

    Certificate status
  7. Into the Remote Desktop Configuration dialog box, type a Username and a password.

    NoteNote

    If the password does not meet the complexity requirements, a red icon will appear next to the password text box. A password that contains a combination of capital letters, lower case letters, and numbers or symbols will pass the complexity requirements.

  8. Choose an account expiration date. The expiration date will automatically block any remote desktop connections when the date passes.

  9. Click OK. A number of settings are added to the .cscfg and .csdef files to enable Remote Access Services.

  10. If you are ready to publish your Windows Azure application, in the Deploy Windows Azure Project dialog box, click OK.

    If you are not ready to publish, click Cancel. Your Remote Desktop configuration will still be saved, and you can publish your application at a later date.

  11. Once you have published your project to Windows Azure, log on to the Management Portal, and click Hosted Services, Storage Accounts & CDN in the lower right hand corner of the screen.

  12. Click Hosted Services, Storage Accounts & CDN in the lower right hand corner of the screen

  13. Click Hosted Services to see the hosted services currently running.

  14. Select your role in the Management portal. In the Remote Access group, ensure that the Enable check box is selected and the Configure button is enabled. This shows that the deployment is enabled for Remote Desktop.

    Enable Remote AccessEnable Remote Access
  15. Select the role instance that you want to connect to, which should enable the Connect button in the Management Portal interface.

  16. Click Connect. Your browser will prompt you to download a .RDP file, which you can open on your local computer.

  17. Open the .RDP file and enter the user and password that you set up in the earlier steps. If you are on a domain, you might have to put a \ in front of the username.

    Remote Desktop Login to Windows Azure Role
  18. You should now be logged into your remote session.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
UserName and Password

In the figure what does it mean by "TYpe in an existing UserName and Password?".

1. What if the user is connecting for the first time from VS
2. Does the password need to be encrypted or VS will encrypt it with the cert. provided?

3. If the user has to encrypt it, there needs to be a link to creating an encrypted password.

These  things are unclear.

 

You are now connected to the Remote Session ?
The last part of the documentation says that you will now be connected to the Remote Session.
Does it mean that you will now have a Remote Desktop Session to the Virtual Machine that is hosting the WebRole (application) ?

Resolved:  Found out that one can Remote into a specific instance of the web or worker role that is housed in a VM.
Documentation updated
Updated to address creating a certificate for this task.

Katrina Lyon-Smith
Re: What kind of certificate
The documentation will be updated within the next few weeks to address this issue.

Regards,
Katrina Lyon-Smith
What kind of certificate?
Same problem, lost varios hours, cannot get it to work.
What kind of different certificate should we generate?
Cheers, Heinrich

Resolved:
1. Choose <Create...> during configuration of Remote Desktop connection
2. Press Button View... right to newly created certificate, tab Details and button Copy to File, export private key...
3. Import this *.pfx to Certificates under Hostes Services in Azure Management Portal
You must create a certificate here - where is it?
First the notes say that this certificate is different. How is it different?
If I create an new certificate here using the VS2010 tools, where is it? Since I am instructed to upload the certificate.  What type should it be?
Really need to amplify on the documentation here.