As I know according to Microsoft Docs here in Dotnet core ConfigureWebHostDefaults makes Kestrel default web server inside the project.
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
So I can use Dotnet Run in my main project path (that contains .sln) and run the project directly with Kestrel without IIS Express and it runs(As I can do that with IIS Express IN VS). But I want to know is there any way to do that in my release production (after Publish) in the local Host in Server? I hosted my project with IIS in server successfully and it works fine but for curiosity, I run Dotnet run in my publish root and it returns:
Welcome to .NET Core 3.1! --------------------- SDK Version: 3.1.404
Telemetry --------- The .NET Core tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
---------------- Explore documentation: https://aka.ms/dotnet-docs Report issues and find source on GitHub: https://github.com/dotnet/core Find out what's new: https://aka.ms/dotnet-whats-new Learn about the installed HTTPS developer cert: https://aka.ms/aspnet-core-https Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs Write your first app: https://aka.ms/first-net-core-app