IIS can not natively host an asp.net core application. You must install a custom IIS module. See
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.