Host ASP.NET Core on Windows Machine with IIS
i'm goging to explain how to host my dotnet core application on windows server or windows Machine step by step
The following operating systems are supported:
• Windows 7 or later
• Windows Server 2012 R2 or later
Open Control Panel ->Programs and Features -> Click on Turn Windows Feature on or of then window will open As-
expand Internate Information Services and check as per required check box module and click on ok button .
then all module will be install.
Install dotnet core SDK as per required
For installing dotnet core SDK click below link download and install latest version
https://dotnet.microsoft.com/download/dotnet-core/3.1.
Install dot net core Hosting bundle
Install the .NET Core Hosting Bundle on the hosting system. The bundle installs the .NET Core Runtime, .NET Core Library, and the ASP.NET Core Module. The module allows ASP.NET Core apps to run behind IIS.
Direct download (current version)Download the installer using the following link:
Current .NET Core Hosting Bundle installer (direct download)
How to Check Bundle are installed or Not in IIS ?
Once you've installed the hosting bundle (or you install the .NET Core SDK on your Dev machine) the AspNetCoreModule is available in the IIS native module list:
Click on Start Button -> search/select internet information services(IIS) Manager then window will open As:-
Go to IIS section -> double click on Modules then window will open As-
Here you will see that your AspNetCoreModuleV2 in installed.
AS I know that your website is created and Published..
If not then go to below link to check how to create dotnet Core Project and Publish
Hosting our Application process on ISS
Click on start button -> click on Internet information services(IIS) Manager then window will open as-
Keep your publish folder on your preferred location
For example I have keep in :-
C:\inetpub\DotnetCorePublish
Right click on Sites -> click on Add Website then window will open
Here type your site Name and provide the physical path location and specify port no.
As I have specify above screen shot.
If you have purchase domain then you type domain Name on Host name section keep port 80.
Click on ok button then your site will be appear in sites section as-
Now click on Application pool then window will open As-
Now double click on created website Name then window will open here you will change .Net CLR Version as No managed Code As below screen shoot.
Now Right click on created Sites Name -> Manage website -> browse
Your application will execute.