Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Windows Server » Deploy MVC Application to AWS EC2 Using RDP and Web Deploy

Deploy MVC Application to AWS EC2 Using RDP and Web Deploy

Posted on 10/10/202122/02/2025 Temitope Odemo By Temitope Odemo 2 Comments on Deploy MVC Application to AWS EC2 Using RDP and Web Deploy
AWS EC2 deployment

In this article, we shall discuss “Deploy MVC Application to AWS EC2 Using RDP and Web Deploy”. AWS EC2 is an amazon compute service, it is an instance of virtual server that can quickly be used to run applications on the Amazon Web Services (AWS) infrastructure. What is RDP? This is a remote desktop protocol that you can use to remotely connect to a Windows computer. If you want to read some other guides on AWS App deployments read these How to Deploy Dynamic Website to AWS EC2, How to host Static Website and Versioning on AWS S3, How to deploy an Angular App to AWS S3.

What is Web Deploy? Web Deploy is a Microsoft Deployment tool that simplifies how migration, management, and deployment of IIS web servers, web applications, and websites is done.

Setting up your AWS Account
- Create an account via https://portal.aws.amazon.com/billing/signup
RDP connection setup
AWS Account Signup

Log in to the AWS management console: https://signin.aws.amazon.com/

Web Deploy MVC application
AWS Login Page

After logging in go to the service section and click on EC2. And launch an EC2 instance.

AWS cloud deployment
Launching Instance

How to Deploy MVC Application

In this guide I will be using Windows Server 2022 Base as the Machine I will be using for the deployment of the .Net App.

AWS EC2 deployment
Setting up of AMI Instance

Continue to follow the installation wizard and click Next: Configure Instance Details

RDP connection setup
Setting up of AMI Instance

Configure your Security Group, check the below image and set your configuration accordingly.

Web Deploy MVC application
Setting the Security Group

The next step is to create a key pair that will give you access to the instance, enter your desired key pair and download and keep it.

AWS cloud deployment
Creating a Key Pair

Launch the instance and wait for the process to complete. Confirm that the Status check passed.

AWS EC2 deployment
Launch Status Check

On the instance, on the summary click on connect button and click on RDP. Make sure you open the port 3389 for the RDP for access on the inbound rules.

RDP connection setup
Instance Summary

Connecting and Initializing: Setting Up RDP Client and Password Retrieval

On the next page, click the RDP client and download remote desktop file which u will launch as the RDP interface to connect. Then click on the Get password and

Web Deploy MVC application
RDP Configuration

In the next page browse to the location you kept the key pair file and click on Decrypt Password.

AWS cloud deployment
Key Pairing

If everything goes fine you will get the below success message:

Password Decryption Successful

The password for instance i-003f9a78cbb964aa8 was successfully decrypted.

You will now be able to connect via RDP to the instance with username as Administrator and the password that was decrypted.

AWS EC2 deployment
Connecting Via RDP

You will now need to launch the remote desktop file that was earlier saved and connect via RDP.

RDP connection setup
Connecting Via RDP

Click the Connect button and enter username and password and click OK.

image-90
Remote Desktop Protocol Connection

Yipee!!! We have successfully accessed the Amazon Machine Image (AMI), the Windows Server 2022 Datacenter Edition.

image-91
Instance Running

From the Windows Server, download and install Microsoft Web Deploy

image-92
Microsoft Web Deploy

Configuring Server Roles and Services for MVC Application Deployment on AWS EC2

The next step is to add the role of the Server Manager. Add Web Server (IIS) and also .NET Framework 4.7 or Higher and under security role services you can also select Basic Authentication, under Application Development select .Net Extensibility 4.7 or Higher and ASP.NET 4.7 or Higher, under Management Tools select Management Service after adding all these you can start installing.

image-93
Adding Server Roles

Confirm the IIS has been properly installed by typing inetmgr in the run

image-94
Accessing your IIS Management Via inetmgr

The below image will be displayed if the installation was successful

image-95
IIS Management

You also need to confirm the IIS via the HTTP by copying the public IP for our instance to a browser. The below display must be what you get at your end.

image-96
IIS Confirmation Display

On the IIS Manager click on the Management Service and confirm that the enable remote connections is selected.

image-97
Setting Up IIS

On the Authentication, page make sure that the Basic Authentication is Enabled.

image-98
IIS Configuration

On the same IIS Management go to the Sites section and remove the Default Web Site.

image-99
IIS Configuration

After removing the Default Web Site add a new Website

image-100
Adding a New Website

Add your Site name and in the Physical path locate inetpub folder and create a new folder for your app inside the wwwroot folder and select the new folder and click ok.

image-101
Site Configuration

Now select the site you created and click on Deploy > Configure Web Deploy Publishing

  • On the pop up box click on Setup so that a publish file will be created.
image-102
Site Deployment

Initiating Local .NET MVC Project Creation in Visual Studio

The next step is to create a .Net project on Visual Studio and select MVC as the project template. I will be doing this on my local system.

image-103
Creating a new Project

After creating the project, you can build the project by clicking on IIS Express (Microsoft Edge)

image-104
Launching your local app

The below image shows that the project builds successfully.

image-105
Published Site locally

Now go back to the instance server and copy the published file that was saved on the desktop and paste somewhere on your local system.

  • Go to the solution explore in Visual Studio and right-click on your project and publish.
  • Import the publish file you copied from the AWS instance Windows Server.
image-106
Publishing configuration

Configuring Publish File with Your Instance’s Public IP Address

Next, you need to edit the publish file and replace it with the public IP of your instance

  • Go to the instance and copy the public IP and replace anywhere we have “EC2AMAZ-MGO0TR-8172”.
  • Enter the machine password too and click on Validate Connection.
image-107
Editing Published Profile

Just like the image below:

image-108
Publishing Connection Setup

Immediately you click on the Validate Connection button you should see the below image. Click on the Accept button.

image-109
Validation Connection

If the connection is fine you will see the Validation Connection passed. Then click Next.

image-110
Validation Connection

On the next page leave the Configuration drop-down as Release then click on Save. Then click on Publish

image-111
Ready to Publish

Enter your server password to start the publish

image-112
Enter your Window Server Password

You will see the published status

image-113
Publishing Status

If the publication is successful, you will see the below

image-114
Publishing Status

The below image is a confirmation that our ASP.NET app has been published to our AWS instance server with public IP 18.224.51.75

image-115
App Successfully Published

Now let’s try to edit the app and republish. Below is my result after editing and republishing:

image-116
Edited App Successfully Published

I hope you found this blog post on how to Deploy MVC Application to AWS EC2 Using RDP and Web Deploy very interesting and helpful. In case you have any questions do not hesitate to ask in the comment section.

5/5 - (1 vote)

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on Threads (Opens in new window) Threads
  • Share on Nextdoor (Opens in new window) Nextdoor
Configuration Management Tool, Web Server, Windows Server Tags:AWS, EC2, EC2 instance, RDP, Remote Desktop Protocol

Post navigation

Previous Post: Set up OpenShift Cluster using Red Hat CodeReady Containers
Next Post: Locate, Find and Grep: Search for files and patterns in Linux or Unix-like OS

Related Posts

  • hero activedirectory 1
    Active Directory Contact and a User Account Object Differences Security | Vulnerability Scans and Assessment
  • How to configure Volume Shadow Copies VSS on Windows Server
    Volume Shadow Copies: How to configure VSS on Windows Server Windows
  • WAMPServer Virtual Host
    How to create Virtual Hosts in a WAMPserver Web Server
  • domain14 1
    How To Configure a Domain Password Policy Windows
  • maxresdefault
    How to delete Organizational Unit in Active Directory Windows Server
  • Was ist Windows Server und wie unterscheidet er sich vom normalen Windows
    Create a certificate template for BitLocker Network Unlock Windows Server

More Related Articles

hero activedirectory 1 Active Directory Contact and a User Account Object Differences Security | Vulnerability Scans and Assessment
How to configure Volume Shadow Copies VSS on Windows Server Volume Shadow Copies: How to configure VSS on Windows Server Windows
WAMPServer Virtual Host How to create Virtual Hosts in a WAMPserver Web Server
domain14 1 How To Configure a Domain Password Policy Windows
maxresdefault How to delete Organizational Unit in Active Directory Windows Server
Was ist Windows Server und wie unterscheidet er sich vom normalen Windows Create a certificate template for BitLocker Network Unlock Windows Server

Comments (2) on “Deploy MVC Application to AWS EC2 Using RDP and Web Deploy”

  1. Avatar photo Randy Wright says:
    25/10/2021 at 12:18 AM

    Fantastic! The granularity of the steps is perfect. It really does take all these steps and without this great article there would be no chance of success. Even a small mistake ruins the whole pudding. I noticed that he had no trouble getting past the dreaded Web Deploy flaw with the certificates and AWS. I hope he can help me with that.

    Log in to Reply
    1. Temitope Temitope Odemo says:
      25/10/2021 at 10:34 PM

      Have you followed the above steps one after another and you still experience the error?

      Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

Veeam Vanguard

  • GRADLE FEATURE
    How to install Gradle on Ubuntu Linux
  • Encrypt Email Sent In Microsoft Outlook
    How To Encrypt Email Sent In Microsoft Outlook Microsoft Exchange/Office/365
  • Server Manager
    How to reinstall Server Manager and disable Server Manager at startup for all users and login users Windows Server
  • ssh
    How to disable RC4 Cipher Algorithms support in SSH Server Linux
  • Enale FIPS compliance mode on Windows
    How to enable FIPS mode on Windows Server Oracle/MSSQL/MySQL
  • Copy and Paste Between HyperV VMs and host
    Copy and Paste between your device to a VM running in Hyper-V Windows
  • HyperV 1
    An error occurred while attempting to connect to the server: Check if the Virtual Machine Management service is running or you are not authorized to connect to this server Virtualization
  • wifi
    Reveal Windows WiFi password of Network you are connected to Windows

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,819 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

Active Directory Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.