
上QQ阅读APP看书,第一时间看更新
How to do it...
First, we have to install some .NET supported components.
- Open Server Manager on Windows Server 2016 and click on the Manage menu. Once in there, click on Add Roles and features.
- Click on Next until you get the Select server roles wizard. Follow the exact route highlighted in this figure:

- 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.
- Click on Next to finish. Now let's go on and upload the .NET framework web pages we created for demo purposes.
- Open IIS Manager, click on Default Web Site, and you will see this screen:

- 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.

- 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.

- 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.

- We have created ASP.NET v4.0 files, which we need to paste in the wwwroot folder, as shown here:

- 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.