Basic quesion on Publishing a Core Project

Coreysan 1,651 Reputation points
2021-07-09T15:59:49.827+00:00

I'm learning how to deploy a MS Core web app. I wrote a one liner and simply used VS2019 to publish it to a folder.
The contents of the folder include an executable, and some DLLs, and some json.

So if I plop this folder on the top level of an IIS server, how will be run? If I run the executable, it only opens a dos command box, and outputs a message.
So how does it work?

I didn't set up the IIS side. My boss did, and it supports .NET framework 4.8. I can deploy classic aspx files and run them just fine, but not Core.
I've always been confused on how IIS runs a Core app.

I'm that ignorant!!!

How does it work?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,212 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce Barker 801 Reputation points
    2021-07-09T16:16:58.803+00:00

    IIS can not natively host an asp.net core application. You must install a custom IIS module. See

    aspnet-core-module

    Once the module is installed, you create a new IIS application and app pool for the a core application. A web.config to configure the module is added to the deployed files.

    Note, a dotnet publish will add the web.config.

    0 comments No comments