Deploy ASP.NET application on Amazon EC2
This article is a step by step guide to deploy an ASP.NET MVC application by using Web Deploy on IIS server, running on Amazon EC2 Windows server.
Step 1: Launch Instance
Once you have logged in to AWS console, Go to EC2 -> Instances, then launch instances and select Microsoft Windows Server 2012 Base and follow the steps.
Before Launching Instances, AWS console prompts you to create a key pair file (.pem file). Once you created the .pem file, download the file to your local machine as this file will be used to obtain passwords for Windows Machine.
Once the instance is in running state, click Connect (It takes around 5-10 min to retrieve the password). It prompts you to upload the .pem file that you have created above. Once you have uploaded the file it will decrypt the file and delivers you a random Password which will be used to connect to Instances using RDP (Remote Desktop Client).
Note: Make sure to open Port 3389 for RDP connections in the security group.
Step 2: Connect to Instances using RDP
You can use Remmina RDP in Ubuntu to connect to Windows Instance with Username: Administrator and Password: (that console delivers after decryption process)
Step 3: Install Web Platform on Windows Server Instance
Web Platform Installer is a free tool used to automate the installation of the Microsoft Web Platform (e.g IIS/Visual Studio) and some third party softwares like WordPress/Drupal/Joomla
Once this is installed, Open Web Platform and search web deploy
Step 4: Install web deploy for Hosting Servers
Step 5: Set up IIS Server with .NET FRAMEWORK features
Press Window + Q, Open Server Manager, it will look like this
Click on Add Roles and Enable following features:
Web Server (IIS) + Application Development and all features listed in below figure.
Step 6: Add website to IIS
- ->Create a directory c:\inetpub\wwwroot\deploy
- ->Start IIS and add a website.
Make sure to choose Application pool same as your application .NET version.
Step 7: Publish Website from Visual Studio
On your local machine, open up Visual Studio.
Create a new ASP.NET web application (.NET framework 4.0) with name “deploy”.
Once the application is set up, click on Build on the navigation bar and select Publish deploy.
You will get the following dialogue box.
Add the credentials and hit the Publish button. If everything goes well you will get your application page.
Very nice post..
I am working as a dotnet developer.
We developed a web application for one of our client,which has deployed in MS 2003 Server operating system.Till now it has been used at
Intranet Environment,this application uses SQL Server2008 as the database.Related to that application we developed windows service , which is
used to fetch the data from as400 database and fill into the SQL Server database on regular basis based on the particular setup time.
So, now we have to move the application to amazon cloud(Client wants to move everything to cloud ).In amazon cloud which service is suitable to
deploy our web application(i.e.which is suitable to existing platform to run application successfully).And what is the pricing details and
procedure for that cloud.Or else will you suggest any other better cloud which is suitable to our requirement?
Please advice on this,my Email ID is “firstname.lastname@example.org”.
i am waiting for your reply..
In AWS you can go with EC2 instance or dedicated Vm. We have other cloud options also but AWS is better comparing the prices.
or go with google cloud you deploy site using visual studio also.
Now all coud providers supporting deployments through the visual studio