Adding the website

As soon as we install the .NET Core Windows Server Hosting bundle, we'll be able to configure our IIS instance to host our application.

As we said earlier in this chapter, to host ASP.NET Core web applications, we'll need IIS 7.5 or later.

From the IIS Manager interface, right click on Sites and choose the Add New Website option. Name it with your solution name, project name, domain name, or anything you like, depending on the naming convention we chose to adopt for our IIS website entries. In this book example, we went with www.testmakerfree.com, since that's the domain we were to use.

By looking at the read-only textbox to the immediate right, we can see that a new Application Pool will also be created with that same name. Take a mental note of it, as we'll need to configure it soon enough.

Set the physical path of the Content Directory to the folder we targeted for FTP publishing.

In our example, it should be something like C:inetpubTestMakerFree, assuming that the FTP root for the web admin user points to C:inetpub. Just ensure that you target the application's root folder, not the wwwroot subdirectory.

Needless to say, we need to grant read/write permissions for that folder to the IUSR and/or IIS_IUSRS accounts, or any other identity our Application Pool is using.

As for the bindings, either choose a specific IP address or leave the All Unassigned option and choose a Host name that is already configured to redirect to our web server via DNS; in our example, since we already set up the www.testmakerfree.com domain name with a DNS redirect to our web server's public IP address, we'll just use that:

Before clicking on the OK button, ensure that the Start Website immediately option is checked, so the website will immediately be available.

We're assuming that the server comes with the .NET Framework installed, as it's a default package with all the latest Windows Server versions. In case it doesn't, we can manually install it via Server Manager, Web Platform Installer, or Windows Update.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.142.2