Deployment of an Asp.net MVC application on the IIS server
Tags: webdev, programming, devops
Published: 2023-03-31 21:01:25

## Introduction
Microsoft's Internet Information Services (IIS) is a versatile, all-purpose web server that provides requested HTML pages or files on Windows PCs.
Remote client computers can submit queries to an IIS web server, which will then deliver the proper response. Web servers can share and distribute information across LANs, such as corporate intranets, and WANs, such as the Internet, thanks to this fundamental functionality.
A web server can provide users with information in a variety of ways, including static HTML-coded web pages, file downloads and uploads, text documents, image files, and more.
Now we will start the implementation of the Deployment of the application Using the IIS Server 

## Step No 1 
Create the Asp.net MVC Application Using Visual Studio.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6j5l1ac6cau3iuh2k3m4.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c50jfugq7sil0x92vk96.png)
Select the Project Type MVC and hit the create button.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a6khealz5q03s8qtft66.png)
Now Our Project is in Initial Deployment stage. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p8wq2whxlzoz9udz83ut.png)
Now our application is ready for Deployment on IIS Server.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hfn56u42o1ce1nhqk4xl.png)
## Step No 2 
Now right click on the application and hit the publish option.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lyzq6jf0jydf1ivrap14.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zwfzs0g6uqgag5che7mf.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0f9odbkzqs761zpx4ufy.png)

We will select the Folder Option.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hyzsif8br7k4owpbd4tr.png)

Create the Directory in your system for Application Build.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wr64pysd67qm810srhk7.png)

Select your folder for application build. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v09yw0rco0i787qzvvg7.png)

Hit the Finish Button and we are good to go. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kdsc5bwcr1z1ik5c3b9u.png)

Our application build Created Successfully.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8f5jbg4rj18qhlia3a38.png)
Our Deployment Build is Ready.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xy2sxyg8kgk23gxff72f.png)

## Step No 3 
Open the IIS Server.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t26nzdf1cfaqgjzge9ej.png)
Right Click on the Websites and Add a new website. Give the name of the website and Add the Physical Path for your Application where you stored the Application Build. The next step will be give the Host name to your website (Simply the Domain Name)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/no2dapwc85verxssw9z4.png)

You can see the setting in the given below screenshot.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j0pd0vm36negeu1jp9n3.png)
Now Click the OK Button
## Step No 4
Open the C Drive and find the system 32 Folder Open the Driver Folder and after that open the etc. folder and tthenopen the Host File 
C:\Windows\System32\drivers\etc

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qrf2w1o116r2nvfz1d33.png)
Open the Host File using Note Pad.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tobmihmed9ywopofixtf.png)
Now Open the CMD and find your IP Address 
Set the IP Address and Host name in Host file in way I am doing below.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q52hr0h6cer3qys0kx3u.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/huo96q9w0bfy7cfz7o1f.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8f382k3bpgqnwzjvn99u.png)
Now go to IIS Server and Browse your website.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tk8bkg36plyjkpig1wn3.png)
## Now Our Application is Live on IIS Server 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ummrn5jsb4wwwplpk5ul.png)