Thursday, March 23, 2023

How to publish and host ASP.NET Core webapp in IIS

 (https://stackify.com/how-to-deploy-asp-net-core-to-iis/)

0) Install .NET Core Windows Server Hosting Bundle

   (https://dotnet.microsoft.com/en-us/download)

1) Open the web application project and publish to file

2) Copy files from publish folder to c:\inetpub\wwwroot

3) Create Application Pool from IIS Manager , choose "No Managed Code" for ".NET CLR Version"

4) Create a website pointing to files folder created in Step 2, and  choose Application Pool created in step 3



For .NET Core Web API, after build, there is an .exe file, just run it, it will start the web API Service

No comments:

Blog Archive