Application is running inside IIS process but is not configured to use IIS server .NET Core 3.0 : <p>I have migrated our application from .NET Core 2.2 to version 3.0. Actually I created the new application in 3.0 from scratch and then copied source code files. Everything looks great but when I try to run the application within Visual Studio 2019 I get the exception: </p>

<blockquote>
  <p>Application is running inside IIS process but is not configured to use IIS server</p>
</blockquote>

<p>Here is my Program.cs</p>

<pre><code>public static class Program
{
    public static void Main(string[] args)
    {
        CreateHostBuilder(args).Build().Run();
    }

    public static IHostBuilder CreateHostBuilder(string[] args) =&gt;
        Host.CreateDefaultBuilder(args)
            .ConfigureWebHostDefaults(webBuilder =&gt;
            {
                webBuilder.UseContentRoot(Directory.GetCurrentDirectory());
                webBuilder.UseKestrel();
                webBuilder.UseIISIntegration();
                webBuilder.UseStartup&lt;Startup&gt;();
            });
}
</code></pre>

<p>The error occurs at the line: CreateHostBuilder(args).Build().Run();
It worked fine in .NET Core 2.2 but it doesn't want to run as 3.0. I cannot find anything else that should be done. Something new in the Startup.cs? I don't know.</p>
