Beruflich Dokumente
Kultur Dokumente
(https://www.guru99.com/)
For users to access a website, it is required that the website is hosted on some sort of web
server. There are different web servers available for different technologies. In .Net, the web
server available is called Internet Information Services or IIS.
Once the web application is developed, it is then deployed on an IIS Server. This web
application can then be accessed by the end users. There are two ways to deploy an
application to the server, you will see both over here.
https://www.guru99.com/deploying-website-iis.html 1/29
5/22/2019 How to Host a Website on IIS: Setup & Deploy Web Application
(/images/asp-
net/061516_1014_Deployingaw1.png)
1. The first part is the request sent by the user. The request will normally be a web page. An
example could be http://example.com/Default.aspx .
2. Once the request comes to the IIS server, it is processed. The IIS Server will perform all the
required operations as per request.
3. Finally, the IIS Server sends the output back to the user. The output will generally be HTML
content sent back to the user. This HTML content will be displayed in the web browser.
https://www.guru99.com/deploying-website-iis.html 2/29
5/22/2019 How to Host a Website on IIS: Setup & Deploy Web Application
(/images/asp-net/061516_1014_Deployingaw2.png)
Once installed, the following steps need to be carried out for installing IIS.
The first step is to click on the 'Add roles and features' on the dashboard.
This allows one to install additional features on a server.
https://www.guru99.com/deploying-website-iis.html 3/29
5/22/2019 How to Host a Website on IIS: Setup & Deploy Web Application
(/images/asp-net/061516_1014_Deployingaw3.png)
Step 2) On the next screen, you need to click the Next button to proceed.
https://www.guru99.com/deploying-website-iis.html 4/29
5/22/2019 How to Host a Website on IIS: Setup & Deploy Web Application
(/images/asp-net/061516_1014_Deployingaw4.png)
1. The first is to choose the Role-based or feature installation. This will allow us to perform the
IIS Installation.
2. Click the 'Next' button to proceed.
https://www.guru99.com/deploying-website-iis.html 5/29
5/22/2019 How to Host a Website on IIS: Setup & Deploy Web Application
(/images/asp-net/061516_1014_Deployingaw5.png)
Step 4) In the next screen, you will see the name of the server on which the installation is taking
place. Click the Next button to proceed.
https://www.guru99.com/deploying-website-iis.html 6/29
5/22/2019 How to Host a Website on IIS: Setup & Deploy Web Application
(/images/asp-net/061516_1014_Deployingaw6.png)
1. Choose the Web server option. This will ensure that IIS gets installed.
2. Click the 'Next' button to proceed.
https://www.guru99.com/deploying-website-iis.html 7/29
5/22/2019 How to Host a Website on IIS: Setup & Deploy Web Application
(/images/asp-net/061516_1014_Deployingaw7.png)
https://www.guru99.com/deploying-website-iis.html 8/29
5/22/2019 How to Host a Website on IIS: Setup & Deploy Web Application
(/images/asp-net/061516_1014_Deployingaw8.png)
Step 7) In the final screen, click the Install button to begin the installation.
https://www.guru99.com/deploying-website-iis.html 9/29
5/22/2019 How to Host a Website on IIS: Setup & Deploy Web Application
(/images/asp-net/061516_1014_Deployingaw9.png)
Once IIS has been installed, you can launch it, by going to search in Windows 2012.
(/images/asp-
net/061516_1014_Deployingaw10.png)
After you click on the above link, IIS will open, and you will be presented with the below screen.
https://www.guru99.com/deploying-website-iis.html 10/29
5/22/2019 How to Host a Website on IIS: Setup & Deploy Web Application
(/images/asp-net/061516_1014_Deployingaw11.png)
In IIS, you will have an initial site set up called Default Web Site.
If you open up your browser and go to the URL http://localhost. You will see the below output.
This URL mainly goes to the Default Web site shown in the previous screen. This is the default
page which indicates that the IIS Server is up and running.
https://www.guru99.com/deploying-website-iis.html 11/29
5/22/2019 How to Host a Website on IIS: Setup & Deploy Web Application
(/images/asp-net/061516_1014_Deployingaw12.png)
There are various ways to deploy a web application. Let's look at the first method which is the
File copy.
We use the web application created in the earlier sections. Let's follow the below-mentioned
steps to achieve this.
Step 1) Let's first ensure we have our web application 'DemoApplication' open in Visual Studio.
https://www.guru99.com/deploying-website-iis.html 12/29
5/22/2019 How to Host a Website on IIS: Setup & Deploy Web Application
(/images/asp-
net/061516_1014_Deployingaw13.png)
Step 2) Open the 'Demo.aspx' file and enter the string "Guru 99 ASP.Net."
(/images/asp-net/061516_1014_Deployingaw14.png)
https://www.guru99.com/deploying-website-iis.html 13/29
5/22/2019 How to Host a Website on IIS: Setup & Deploy Web Application
<!DOCTYPE html>
<html xmlns="http://www.w3.ore/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server”>
<div>
Guru 99 ASP.Net
</div>
</form>
</body>
</html>
Now just run the application in Visual Studio to make sure it works.
Output:-
(/images/asp-
net/061516_1014_Deployingaw15.png)
The text 'Guru 99 ASP.Net' is displayed. You should get the above output in the browser.
https://www.guru99.com/deploying-website-iis.html 14/29
5/22/2019 How to Host a Website on IIS: Setup & Deploy Web Application
(/images/asp-net/061516_1014_Deployingaw16.png)
Step 4) In the next step, choose the 'New Profile' to create a new Publish profile. The publish
profile will have the settings for publishing the web application via File copy.
(/images/asp-net/061516_1014_Deployingaw17.png)
Step 5) In the next screen we have to provide the details of the profile.
(/images/asp-
net/061516_1014_Deployingaw18.png)
Step 6) In this step, we specifically mention that we are going to Publish website via File copy.
https://www.guru99.com/deploying-website-iis.html 16/29
5/22/2019 How to Host a Website on IIS: Setup & Deploy Web Application
(/images/asp-net/061516_1014_Deployingaw19.png)
https://www.guru99.com/deploying-website-iis.html 17/29
5/22/2019 How to Host a Website on IIS: Setup & Deploy Web Application
(/images/asp-net/061516_1014_Deployingaw20.png)
https://www.guru99.com/deploying-website-iis.html 18/29
5/22/2019 How to Host a Website on IIS: Setup & Deploy Web Application
(/images/asp-net/061516_1014_Deployingaw21.png)
When all of the above steps are executed, you will get the following output in Visual Studio
Output:-
(/images/asp-
net/061516_1014_Deployingaw22.png)
https://www.guru99.com/deploying-website-iis.html 19/29
From the output, you will see thatHow
5/22/2019
theto Publish succeeded.
Host a Website on IIS: Setup & Deploy Web Application
(/images/asp-
net/061516_1014_Deployingaw23.png)
You can see from the output that now when you browse to http://localhost/Demo.aspx , the
page appears. It also displays the text 'Guru 99 ASP.Net'.
Let's use the same Demo Application and see how we can publish using the "website publish
method."
https://www.guru99.com/deploying-website-iis.html 20/29
5/22/2019 How to Host a Website on IIS: Setup & Deploy Web Application
(/images/asp-net/061516_1014_Deployingaw24.png)
Step 2) On the next screen, select the 'New Profile' option to create a new Publish profile. The
publish profile will have the settings for publishing the web application via Web Deploy.
(/images/asp-net/061516_1014_Deployingaw25.png)
Step 3) In the next screen we have to provide the details of the profile.
https://www.guru99.com/deploying-website-iis.html 21/29
5/22/2019 How to Host a Website on IIS: Setup & Deploy Web Application
(/images/asp-
net/061516_1014_Deployingaw26.png)
Step 4) In the next screen, you need to give all the details for the publish process
https://www.guru99.com/deploying-website-iis.html 22/29
5/22/2019 How to Host a Website on IIS: Setup & Deploy Web Application
(/images/asp-net/061516_1014_Deployingaw27.png)
https://www.guru99.com/deploying-website-iis.html 23/29
5/22/2019 How to Host a Website on IIS: Setup & Deploy Web Application
(/images/asp-net/061516_1014_Deployingaw28.png)
https://www.guru99.com/deploying-website-iis.html 24/29
5/22/2019 How to Host a Website on IIS: Setup & Deploy Web Application
(/images/asp-net/061516_1014_Deployingaw29.png)
When all of the above steps are executed, you will get the following output in Visual Studio.
Output:-
(/images/asp-net/061516_1014_Deployingaw30.png)
https://www.guru99.com/deploying-website-iis.html 25/29
From the output, you will see thatHow
5/22/2019
theto Publish succeeded.
Host a Website on IIS: Setup & Deploy Web Application
(/images/asp-
net/061516_1014_Deployingaw31.png)
You can see from the output that now when you browse to http://localhost/Demo.aspx , the
page appears. It also displays the text Guru 99 ASP.Net.
Summary
After an ASP.Net application is developed, the next step is that it needs to be deployed.
In .Net, IIS is the default web server for ASP.Net applications.
ASP.Net web applications can be deployed using File copy method.
ASP.Net web applications can also be deployed using Web Publish method.
Next (/asp-net-unit-testing-project.html)
ASP-Net. Tutorial
2) Application & PAGE Life Cycle (/asp-net-intro-life-cycle-hello.html)
https://www.guru99.com/deploying-website-iis.html 27/29
5/22/2019 How to Host a Website on IIS: Setup & Deploy Web Application
(https://www.facebook.com/guru99com/)
(https://twitter.com/guru99com)
(https://www.youtube.com/channel/UC19i1XD6k88KqHlET8atqFQ)
(https://forms.aweber.com/form/46/724807646.htm)
About
About Us (/about-us.html)
Advertise with Us (/advertise-us.html)
Write For Us (/become-an-instructor.html)
Contact Us (/contact-us.html)
Career Suggestion
SAP Career Suggestion Tool (/best-sap-module.html)
Software Testing as a Career (/software-testing-career-
https://www.guru99.com/deploying-website-iis.html 28/29
5/22/2019
complete-guide.html)
How to Host a Website on IIS: Setup & Deploy Web Application
Certificates (/certificate-it-professional.html)
Interesting
Books to Read! (/books.html)
Blog (/blog/)
Quiz (/tests.html)
eBook (/ebook-pdf.html)
Execute online
Execute Java Online (/try-java-editor.html)
Execute Javascript (/execute-javascript-online.html)
Execute HTML (/execute-html-online.html)
Execute Python (/execute-python-online.html)
https://www.guru99.com/deploying-website-iis.html 29/29