The Windows Azure SDK 1.3 and later 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.
Note: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 follow these steps
- Open Solution Explorer, right-click the name of your project, and then click Publish.
- The Deploy Windows Azure project dialog box appears. At the bottom of the dialog box, click the Configure Remote Desktop connections link at the bottom.
- The Remote Desktop Configuration dialog box appears. checked the checkbox Enable connections for all roles.
Note :=>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.
- You can select an existing certificate from the drop-down list or you can create a new one.
Note:=>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.
- To create a new certificate select <create> from the drop-down list.
The Create Certificate dialog box appears.
- Type a friendly name for the new certificate and then click OK
- To upload this certificate to the Windows Azure Platform Management portal, click View.
- Click the Details tab.
- To copy this certificate to a file, click Copy to File
- To export a private key for this certificate, select Yes, export the private keyand then click Next.
- To select the default export file format, click Next
- To protect this private key using a password, type a password. Confirm this password and then click Next.
- 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.
- To create this file, click Finish.
- Using the Windows Azure Platform Management portal, upload the certificate for the hosted service that you will connect to with Remote Desktop Services.
Note:=>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.
- Into the Remote Desktop Configuration dialog box, type a Username and a Password.
Note:=>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.
- Choose an account expiration date. The expiration date will automatically block any remote desktop connections when the date passes.
- Click OK. A number of settings are added to the .cscfg and .csdef files to enable Remote Access Services.
- 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.
- 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.
- Click Hosted Services to see the hosted services currently running.
- 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.
- Select the role instance that you want to connect to, which should enable the Connect button in the Management Portal interface.
- Click Connect. Your browser will prompt you to download a .RDP file, which you can open on your local computer.
- 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.
- You should now be logged into your remote session.