Microsoft IIS 10.0 – Hosting .NET web page

How to Install SQL Server 2019 on Windows Server

In this recipe, we are going to host a .NET default v4.0-supported web page. We will check out the default website properties. We will upload the web page to the default wwwroot directory.

Getting ready

We need a v4.0 application to be installed on IIS 10.0 Server, and our v4.0 .NET web page should be ready. We’ll need to install some IIS components not installed already in IIS 10.0. For this, you must have administrative privileges.

How to do it…

First, we have to install some .NET supported components.

  1. Open Server Manager on Windows Server 2016 and click on the Manage menu. Once in there, click on Add Roles and features.
  2. Click on Next until you get the Select server roles wizard. Follow the exact route highlighted in this figure:
  1. Expand Application Development. You have to select .NET Extensibility 3.5, .NET Extensibility 4.6, ASP, ASP.NET 3.5, ASP.NET 4.6, ISAPI Extensions, and ISAPI Filters.
  2. Click on Next to finish. Now let’s go on and upload the .NET framework web pages we created for demo purposes.

 

 

  1. Open IIS Manager, click on Default Web Site, and you will see this screen:
  1. In the Actions pane, you have to click on Basic Settings… and check which version of the application pool is associated with the default web site.
  1. We have selected DefaultAppPool. Click on the Select… button; you’ll see the screen shown in the next figure. Select DefaultAppPool from the dropdown and click on the OK button to finish the pool section.
  1. Right-click on Default Web Site, click on Explore, which is in the top-right corner or can be called using the context menu of Default Web Site in the left-hand panel, as highlighted in the next figure. You will get the wwwroot directory, where you have to upload .NET web files.
  1. We have created ASP.NET v4.0 files, which we need to paste in the wwwroot folder, as shown here:
  1. Here, we’ve uploaded the .NET application files we created for testing and demo purposes. We will test the application in the last recipe of this chapter later.

How it works…

In this recipe, we installed the NET Extensibility 3.5 and 4.6 components. We also installed support for asp, asp.NET, and ISAPI, which are not available in a default installation of IIS 10.0. We explored application pool properties and uploaded v4.0 .NET application files we created for demo purposes.

Now, upload your files to the wwwroot directory, which is associated with the default website. Once you access the default website URL, your .NET application files will be processed by the application pool.

Comments are closed.