Floating FB popout byF5debug

Windows Azure – Configure & Connect to Remote Desktop of Asp.Net Azure Web Role

 

Introduction:

In this article we are going to see how to configure and connect a Remote Desktop of Asp.Net Azure Web Role by creating a new Azure web application and initializing the process.

Overview:

Remote desktop normally we used to get access to the server physically to do some manipulations as per the requirement. Here the same purpose of to access the role instance on to the server for development purpose only and not for running any windows client on to the server using the Remote session. To enable a Remote session for a Role we need to follow few steps to first Initialize, then configure and later we can connect to the Remote Desktop as we normally do for a server.

[more]

Lets us see the step by step process of how to create a new role and add the remote desktop access and configure it on the server using the Windows Azure Management Portal.

Steps:

Open Visual Studio 2010 –> File –> New Project and navigate to the Cloud tab at the left and select Windows Azure Project and change the name of the project to RemoteDesktopSample as shown in the screen below.

Note – Check my Previous Article of clear steps on how to create a new Azure application and hosting it to the cloud in detail

clip_image002

Now a pop up window opens to select the Role from the list of roles available as shown in the screen below

clip_image004

Since we are going to create a sample we go with ASP.Net Web Role , Select the Role and click on the > button to select the role as shown in the screen below.

clip_image006

Clicking on OK button will open a new project with some inbuilt structures as shown in the screen below. Do some modifications as shown in the screen below to host the application to the cloud and check for the result.

clip_image008

Now we are done with our application to check the application locally Hit F5 to build and execute the process and we can see the Build Success as shown in the screen below.

clip_image010

Once the execution is completed with the packaging we can see the application available locally as shown in the screen below.

clip_image012

Now in order to activate the Remote Desktop session, Right click the Azure application and click on Publish as shown in the screen below.

clip_image014

We will see a pop up window with the 2 different options(Check my previous articles to get indepth knowledge of the options) Click on the “Configure Remote Desktop Connections…” as shown in the screen below

clip_image016

Click on the “Enable Connections for all roles” check box and select the Create or Select certificate option drop down and select already existing certificate or click on Create as shown in the screen below

clip_image018

Now we will get a pop up asking for a friendly name, we can give any name for the certificate as per our wish as shown in the screen below. Here we have given it as f5Debug to have it handy

clip_image020

Clicking on the OK button after giving a desired name, we need to enter a user name and password that will be used for connecting remotely. For pass we need to follow some specific rules with password should contain a mixture of Upper, lower cases, digits and symbols as shown in the screen below.

clip_image022

Once we gave valid credentials and the Account expiration date your screen looks like below, Click on OK to complete the steps.

clip_image024

Now click on OK to start the publish and we can see the configuration file and package created as shown in the screen below (Check my previous articles on the usage of these files in detail)

clip_image026

Now we are done with creating a certificate and publish files(service and config files). In order to get the certificate we need to follow some steps

Note – Check my previous article on how to create a certificate and export it in details using the link

To get the certificate, click on Start –> Run and type certmgr.msc as shown in the screen below

clip_image028

New window will be opened with the grouped list of certificates installed on to the computer as shown in the screen below.

clip_image030

Now select Personal –> Certificates and we can see the list of personal certificates created on the server. Select the certificate which we created for this sample(f5Debug friendly name) as shown in the screen below.

clip_image032

Double click the certificate will open a window , navigate to Details tab and click on Copy to File  as shown in the screen below.

clip_image034

A wizard will open to export the certificate as shown in the screen below.

clip_image036

Click on Next to start the wizard and select Yes, export the private key and click on next button as shown below

clip_image038

Now select Personal Information Exchange and click on Next button as shown below

clip_image040

Enter the password for the certificate as shown in the screen below and click on Next button.

clip_image042

Now it will prompt for the path to save the certificate .pfx file, navigate to a user friendly path and select it as shown in the screen below.

clip_image044

Clicking on next will provide a summary for the export, now click on Finish will complete the process and we can see a message that the export was successful as shown in the screen below.

clip_image046

Now we are done with the process of creating a certificate, exporting the certificate to a file and created the service file and the package of the application roles.

Now login to the management portal using the below link

http://www.microsoft.com/windowsazure/

We can see a screen like below. Select the Sign into Management portal at the top right corner

clip_image048

After selecting that sign in to management portal you will be asked for the Username and Password to authenticate the process as shown in the below screen

clip_image050

Once we gave the correct credentials and click on submit button will navigate to the main screen of the portal as shown in the below screen

clip_image052

Now click on the Hosted Services, Storage Account and CDN option in the bottom menu and then select the Hosted Services as shown in the screen below.

clip_image054

Click on the New hosted service and create a service as shown below

Note – Check my previous article on how to create a hosted service in detail.

clip_image056

Once we gave valid credentials along with the environment and the package files we can see the application will be created as shown in the below screen.

First the Hosted Service is created

clip_image058

We can see the status of the hosted service creation step by step in the status column as shown below.

clip_image060

Now once the service is created, the new application will be created and we can see the status as shown below.

clip_image062

We can see the hosted service role, instance is been created with the different steps like below(Waiting for Host, Creating Host, Starting Host) as shown in the screens below.

clip_image064

clip_image066

clip_image068

Once the steps are done, we can see the service, application roles and instances are created and status is Ready which indicates that we can use the application online as shown in the screen below.

clip_image070

Now add the certificate which we created to the hosted service as shown in the screen below. Click on Add Certificate

Note – Check my previous article on how to add the certificate in detail

clip_image072

Select the certificate path and provide the password which we gave while exporting the certificate as shown in the screen below and click on create button.

clip_image074

We can see the status of creating the certificate as shown in the screen below

clip_image076

Once the process gets completed we can see a new certificate has been created successfully as shown in the screen below

clip_image078

Now click on the Role and we can see the Enable and Configure buttons in the Top Ribbon Menu enabled as shown in the screen below.

clip_image080

Click on the Enable Checkbox and click on Configure to configure the remote desktop steps, we will get a pop up screen as shown below.

clip_image082

Enter the valid credentials of username and password, note that the password is enforced with some rules. Providing valid credentials will allow us to proceed further. Now click on OK button to process the configuration as shown in the screen below

clip_image084

Now we can see the configuration process takes place as shown in the screen below.

clip_image086

We can see the Roles and instances of the application gets updated in the Status message as shown in the screen below.

clip_image088

Once the update gets completed we can see now the Roles and Instance are ready as shown in the screen below.

clip_image090

Now we can see the Connect Button on the top ribbon menu enabled. Click on the Connect button to proceed further as shown in the screen below.

clip_image092

Now we can see file (Remote desktop file .rdp ) will be prompted to save in the local drive, save it an accessible location as shown in the screen below.

clip_image094

Now double click the file will open a window asking to connect to the server. We can see the server name(Remote computer) as shown in the screen below. Click on Connect button to proceed further.

clip_image096

Clicking on Connect button will open a security window asking to enter the user name and password to authorize the account. Provide the username and password which we gave at the time of configuration as shown in the screen below and click on OK button to proceed further

clip_image098

Now a warning will be prompted, just ignore that warning and click on yes to proceed further as shown in the screen below.

clip_image100

We can see the secure connection to the remote server will happen and we can see the status as shown in the screen below.

clip_image102

Finally we will be logged into the Remote server of the role as shown in the screen below. Also we can see that the server is Windows Server 2008 Enterprise which is not a genuine.

clip_image104

Now we can use the Remote server as a normal server which we use it traditionally as shown in the screen below.

clip_image106

Conclusion:

So in this article we have seen the step step process of how to configure the remote desktop connection for each and every role and connect to the specified server

About Author: Karthikeyan Anbarasan, Microsoft MVP (Most Valuable Professional) in ASP.NET/IIS Architecture. He is the Founder and Chief Editor of the www.f5debug.net website and has authored books on Windows Phone and Business Intelligence(SSIS). He is also a Passionate Speaker and a Blogger on Microsoft Technologies.

You can Join Me On: Facebook, Twitter, Google Plus, LinkedIn

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

Recent Posts

Random Posts

Most Viewed

URL Shortner

Create your own short urls!!!

Site Counter

free counters

Disclaimer

This is a personal weblog. The opinions expressed here represent my own and not those of my employer. For accuracy and official reference refer to MSDN/ TechNet. I have documented my personal experience on this blog.

Protected by Copyscape Web Plagiarism Finder

Site Meter