Upload Pdf Files to Ec2 Instance .net Core

  • Updated date Oct 12, 2020
  • 8.9k
  • 5

By the end of this article, you will be able to create a windows server, enable IIS, and host .Internet core app with IIS.

Today we are going to create an EC2 instance of Windows Server and nosotros will see how can nosotros enable IIS for hosting a .Cyberspace cadre awarding. So let usa start with AWS.

What is AWS?

So in one line, AWS stands for Amazon Web Services and it is the cloud computing platform from Amazon, for more you can read here.

What is EC2?

EC2 stands for Amazon Rubberband Compute Deject (Amazon EC2) and it is a spider web service that provides various compute capacity in the cloud. It lets u.s.a. create the desired computing environment quickly. For case, if yous need a server upward and running for yous to test or deploy your application it will take only a minute or 2 to set up your server in EC2.

So permit us create a virtual machine and host an IIS application. At beginning, you need to have an AWS account. if you're a educatee then there is an easier mode to get an AWS account using GitHub Pupil Developer Pack which you tin bank check out hither.

Footstep 1

Go to AWS and click on AWS Management Console under My Account then choose Root user or IAM user based on the description and enter your email.

How To Create AWS EC2 Instance And Host .NET Application With IIS

Click on side by side and and then enter your password and click on Sign in.

How To Create AWS EC2 Instance And Host .NET Application With IIS

Step 2

After signing in you will see this screen under the compute click on EC2 so you will be presented with the below screen.

How To Create AWS EC2 Instance And Host .NET Application With IIS

Click on launch example.

How To Create AWS EC2 Instance And Host .NET Application With IIS

Step 3

Then cull your preferred server image, I want to install the Windows server so I volition continue with this.

How To Create AWS EC2 Instance And Host .NET Application With IIS

So I will choose the free tier. What is the free tier now?

In this tier, for the first 12 months following your AWS sign-up date, you lot get up to 750 hours of micro instances each month. When your free usage tier expires or if your usage exceeds the free tier restrictions, you lot pay standard, pay-every bit-you-get service rates.

How To Create AWS EC2 Instance And Host .NET Application With IIS

Stride four

Click on Configure instance details --  I will exit everything default here.

How To Create AWS EC2 Instance And Host .NET Application With IIS

Step five

Click on adjacent to add storage. The default provided storage is 30 GB y'all tin add together more as per your need.

How To Create AWS EC2 Instance And Host .NET Application With IIS

Step six

Now click on the side by side to add a tag. A tag consists of a example-sensitive cardinal-value pair. For example, you could ascertain a tag with primal = Name and value = Webserver. Then I am adding a Windows Auto instance.

How To Create AWS EC2 Instance And Host .NET Application With IIS

Stride 7

Click on next Configure Security Grouping

How To Create AWS EC2 Instance And Host .NET Application With IIS

Step 8

And so click on review and launch at present.

How To Create AWS EC2 Instance And Host .NET Application With IIS

You will be asked to cull a key pair for authorization purposes. Choose to create a new key-pair and enter the name of your Central Pair and and so click on download Central Pair.

You need to keep information technology safe.

How To Create AWS EC2 Instance And Host .NET Application With IIS

Click on view instance and you volition see your case running

How To Create AWS EC2 Instance And Host .NET Application With IIS

Step 9

You will see the newly created instance is running and now yous need to click on connect so that we will exist able to collaborate with the Windows server. And then click on connect and choose RDP client.

How To Create AWS EC2 Instance And Host .NET Application With IIS

Step ten

Now click on Download remote desktop file and afterwards that click on Get password. Y'all demand to browse your keypar.pem file in order to get your password. Now open the file you lot have downloaded and put your password.

How To Create AWS EC2 Instance And Host .NET Application With IIS

You must see your windows server screen.

Pace 11

Now we need to enable the IIS server for hosting our .Net core app. So for that please follow the steps.

Click on Add roles and features

How To Create AWS EC2 Instance And Host .NET Application With IIS

Click Next

How To Create AWS EC2 Instance And Host .NET Application With IIS

Now choose Role-based or feature-based installation

How To Create AWS EC2 Instance And Host .NET Application With IIS

Cull server

How To Create AWS EC2 Instance And Host .NET Application With IIS

Install .Net

How To Create AWS EC2 Instance And Host .NET Application With IIS

Click on next and expect for the installation to complete.

How To Create AWS EC2 Instance And Host .NET Application With IIS

Step 12

Now yous must see IIS and then get to tools and choose IIS Manager

How To Create AWS EC2 Instance And Host .NET Application With IIS

Step 13

If y'all take your own application then

  • Get to C:\ (C bulldoze)
  • Go to intepub folder
  • Become to wwwroot folder and create a folder where we will be keeping our project publish files.

You can download one sample project here.

At present under your server, you must see sites. Right-click on

and choose Add Websites. Give the proper name of your site and browser the project binder and in the port lxxx is used by IIS and then give any other port like 8080 or you can give 80 too but you demand to alter the default's port to something else and click ok.

How To Create AWS EC2 Instance And Host .NET Application With IIS

Pace fourteen

Now become to the Application puddle and choose Correct-click on your application and Bones Setting and gear up .Net CLR version to No managed code and Managed Pipeline Way to Integrated.

How To Create AWS EC2 Instance And Host .NET Application With IIS

Step 15

Go to sites and Right-Click on your site and choose managewebsite and click on Browse  and at present you will see your website up and running.

How To Create AWS EC2 Instance And Host .NET Application With IIS

So this is how nosotros tin can create a Windows server in AWS and host .Cyberspace application also I have written how to host PHP and Node.js app in an AWS EC2 instance. You can read it here.

  • How To Create AWS EC2 Instance And Host PHP Applications
  • How To Create AWS EC2 Instance And Host NodeJS Application With Nginx

Side by side, we are going to see how can we load balance these servers using HAPROXY. So stay tuned and stay safe.

annhatishe.blogspot.com

Source: https://www.c-sharpcorner.com/article/how-to-create-aws-ec2-instance-and/

0 Response to "Upload Pdf Files to Ec2 Instance .net Core"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel