NET 6 - Self Hosting

Last modified: June 21, 2021

To host an ASP.NET 5 Application into IIS (Internet Information Service) on Windows 10, we need to install following components. Same applies to run in Microsoft Windows Server.

hosting hosting hosting

We also need to download and install The .NET Core Hosting Bundle from https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/hosting-bundle?view=aspnetcore-5.0. This allows to run ASP.NET 5 application into IIS.

We now create a website as shown below. hosting

We need to configure Application Pool for the Event, go to the "Advanced Settings". Change the Identity to **Local System".

hosting

Open SSMS -> Security -> Logins -> 'NT AUTHORITY\SYSTEM'. Right-click the Properties and give it the sysadmin permission. hosting

Visit http://localhost:90 and register an account. Once you successfully register, you can visit http://localhost:90/Event for Event Controller and http://localhost:90/EventBooking for EventBooking Controller.