In this blog post, we would see how to enable RDP (Remote Desktop) for a Windows Azure web role. You would see that it’s pretty straightforward. Just note that this blog post is not about How to deploy a Windows Azure web role and it’s also not about How to develop an application that can be ported to Windows Azure. Nope, This blog post is just about enabling Remote Desktop for an ‘Hello world’ application (MVC3 web app) deployed as a Windows Azure web role. And yes, I would be using the Azure SDK 1.6 (Nov 2011). I mention this because Windows Azure is growing rapidly and growing for the better and since Microsoft folks are trying to give us the best developer experience – you may find that the exact steps may differ in future.
I created an app by following steps: File, New, Project, Installed templates, Visual c#, cloud, Windows Azure project, ASP.Net MVC3 web role, Internet application. Clicked OK
Then I edited the default text in the app and so now I have this nice little MVC3 web app running Locally. Just a Hello world app.
Courtesy: A default ASP.NET MVC 3 project with an account controller that uses forms authentication.
Now in solution explorer, right-click the project and click on “publish”
Now, In the Publish Windows Azure application, choose the subscription. If you are doing it for the first time, click on “Sign in to download credentials”. Login with the Live ID and download a file like:
And click the import button in the Publish Windows Azure application wizard and point to this file and open it.
This is how it looks:
Click on Next >
Now if your subscription does not have any hosted services, you would be prompted to create one. Provide the Name and Location.
Now once you do that – In the common settings, To enable Remote Desktop you’ll need to select the check box Enable Remote Desktop for all roles. Also notice that since I just want to the app to be in staging environment, I selected the Environment as staging. To enable Remote Desktop to a web role, you can set the environment as production too. Either way, you can enable Remote Desktop.
Now when to click on the check box, a window would pop up and here, you will need to specify the username and password that you will use to RDP into the Web role. Provide a strong password which is important, and by default it asks you for a password that is at least 6 characters in length with upper, lower, digits and symbols in it.
Click Ok when done.
And press next >
The next step shows the summary:
Click on Publish
You need to wait for a 3-4 minutes while it is deploying and you can see the progress in the Windows Azure Activity Log. And when it completes, you can see a the Website URL:
Now to RDP into Azure web role, Go to Azure management portal, Hosted services storage accounts and CDN, Hosted services.
Now here select your subscription, and select the instance:
Now on the Top Right section of the portal, In the Remote Access section, Click on Connect
save the .rdp file.
Then, open the file. And click on connect and provide the password which you had set earlier for RDP earlier. click on OK.
It’ll attempt to connect.
On successful connection, you would see:
In this blog-post, we saw how to enable remote desktop for a Windows Azure web role.