« 3 Things Developers Always Miss... And Customers Get Annoyed With | Main | SEO Tips and Tools (My Raw Notes) »

October 28, 2010

Remote Desktop Connection to Windows Azure Instance

It has been long time since my last post related to Windows Azure. We have been concentrated on delivering all the new and exciting features for PDC2010, and of course we wanted to keep them secret.

In this morning’s PDC2010 keynote Bob Muglia revealed the secret, and I would like to start with my favorite feature – establish Remote Desktop connection to any Windows Azure instance. Here is the step-by-step guide how to enable the feature, and how to use it.

Configuring Windows Azure Deployment for RDP

The first thing I did is to create new basic Cloud Project in Visual Studio. I called it Hello RDP. Nothing new here. I modified the Default.aspx page just to make it say: “Hello, RDP!”.

Here are the steps (quite simple) that you need to go through to enable Remote Desktop in your deployment:

  1. In Visual Studio right-click on the Cloud Project (Hello RDP in my case) and select Publish. You will be presented with the Deploy Windows Azure project dialog below:


    I have selected the Create Service Package Only option but you have the choice to deploy from Visual Studio to the cloud directly if you want.
  2. Next click on the link Configure Remote Desktop connection above the OK button. You will see the Remote Desktop Configuration dialog where you can select the certificate you want to use to encrypt the credentials as well as the actual credentials you want to use to login to the instance and the expiration date for the password.

    In the Certificates drop down you can select a certificate from your local cert store or create a new one that will be sored locally. After you fill in all the information click on the OK button in the current dialog as well as in the deployment dialog.

    Your package will be created on the local hard drive.

    Note: If you do not have Hosted Service created and/or if you don’t have the certificate already uploaded through the Windows Azure Portal you should create the package locally and deploy it through the Portal. See next section for more details.

Configuring the Windows Azure Hosted Service

In the current implementation (as of PDC10) you need to create hosted service and upload the certificate before you do the deployment. There may be some changes for the official release of the new UI in order to make it more streamlined. Here is the current workflow:

  1. Load the Windows Azure Portal and click on Compute, Storage & CDN in the navigation area

  2. Click on the Compute Services node in the tree. In the grid you will see your subscription (or subscriptions if you have more than one)

  3. Click on the New Hosted Service button, and you will get the dialog to fill in Hosted Service and Deployment information


    In the new Windows Azure Portal UI we combined the creation of Hosted Service and the Deployment in one step. However for RDP you should choose the “Do not deploy” option because you will receive error if you don’t have the certificate uploaded.
  4. When you fill in all the information click the OK button and you will see your Hosted Service appear below your subscription.

  5. Expand the Compute Services node in the tree and select the Service Certificates node

  6. Click on Add Certificate to open the Upload Certificate dialog. Select the same certificate that you selected in the Visual Studio dialog when configuring your package, and click the Create button.

    Note: Make sure you select the right Hosted Service in the Target Hosted Service dialog

  7. After it is uploaded you will see your certificate in the grid

  8. Go back to the Compute Services view and click on New Production Deployment (or New Staging Deployment if you want to deploy to staging). Create a new Deployment dialog will appear where you can select the package and the configuration file you created in visual studio above.

  9. After clicking OK you will see new line item in the grid that represents your deployment. In addition you will receive frequent updates what is happening with the deployment, and it will expand once the roles and instances are spun up. Really cute – isn’t it? Winking smile We refresh the status every 10 seconds.

    Now, you just need to wait until your deployment is complete.

Connecting to the Windows Azure Instance

Once the deployment is complete the instances will be in Ready state, and when you select any one of them the Remote Desktop Connect button in the ribbon will light up.



When you click the Connect button you will be asked to download RDP file from the Windows Azure Portal (Note: Silverlight will also present you with security warning the first time you click on the Remote Access Connect button; you can select the checkbox in the warning if you don’t want to be warned in the future). You can select Open in the prompt for downloading the RDP file and the connection to the Windows Azure Instance will be established. Optionally you can save the RDP file locally for future use.




Voila! You are in!




Finally, it is highly recommended that you turn off Remote Desktop access to your Windows Azure instances when you don’t need it in order to avoid security risks. You can do this very easily from the Portal – just select the Role row, and uncheck the Remote Access Enabled checkbox:



Final Notes and Disclaimers About the Remote Desktop Feature

Couple of things I would like to mention at the end:

  • First, the Remote Desktop feature is scheduled to be released at the end of the year, which means we are still working on it and there may be some changes in the workflow
  • And second, the new Windows Azure Portal UI is also scheduled to release at the end of November and there may be some changes in the UI also. I have used the environment we use for the PDC demos to make the screenshots above, and if you are attending the conference you will see the same UI in the hands-on labs

I will try to update this blog post with any changes we make between PDC and the final release.

Hope you enjoy the new features in Windows Azure, and as always your feedback is highly appreciated.


Update (March 30th 2011) – Troubleshooting Remote Desktop Connectivity Issues

If you are experiencing issues establishing remote desktop connection to your Windows Azure instance you may want to check the RDP file that is downloaded from Windows Azure Management Portal. Here is what you need to do:

  1. Click on Connect button in Windows Azure Management Portal
  2. Save the RDP file on your local machine
  3. Open the RDP file with Notepad and verify the following
    full address:s:[your_dns_name].cloudapp.net
    LoadBalanceInfo:s:Cookie: mstshash=[role_name]#[instance_name]#Microsoft.WindowsAzure.Plugins.RemoteAccess.Rdp

In some occasions
part will be missing and this will prevent you from establishing remote connection to your Windows Azure instance
. Add the necessary information to the RDP file and save it.

You can get the role_name and the instance_name from the Management Portal








Feed You can follow this conversation by subscribing to the comment feed for this post.


Hi Toddy,

Congratulations for this post, very fast after the PDC10. :)

I have a doubt about your visual studio version.
I can't see the link "Configure Remote Desktop connection" im my version.
I'm using Visual Studio 2010 Version 10.0.30319.1 Ultimate

Help me please.



Hi Michael,

As I mentioned in the post above, this functionality will be released towards the end of the year. This includes also VS functionality for cloud deployment.
Same timelines were also communicated at PDC.
Unfortunately you will need to wait few more weeks.


I am really excited about all these new things from PDC, can't wait to try them out. Is full server management available within rdp? For instance if you are running a web instance can you rdp and install a windows service or are there limits on what is available?



Yes, this should be possible because you have full admin access. Keep in mind that whatever you install on this particular instance will be gone if the instance is moved.


You may also want to try free Ammyy Admin

It doesn't require installation or specific config. It works behind gateways NAT without port mapping as well as within one LAN.

Good alternative though!


Is it possible to explain this topic by using Powershell ?
I need to connect to one of instances, where I have a cloud service which has two instances.
from portal I can connect to it via RDP, but I can not do it from powershell. I know how to do powershell remoting for a VM, but I don't know how to do it for a Worker Role or an instance.
Highly appreciated if you help me


@Majid, unfortunately I am not a Power Shell user and I will not be very helpful here. I would suggest you post your question on Azure's forums at http://social.msdn.microsoft.com/Forums/en-US/category/windowsazureplatform

Post a comment

Comments are moderated, and will not appear on this weblog until the author has approved them.

If you have a TypeKey or TypePad account, please Sign In