Created
March 22, 2021 18:20
-
-
Save deeja/eb614df7e4f9ab214081217dbb956ddd to your computer and use it in GitHub Desktop.
Kestrel self hosting .net core 3.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Kestrel": { | |
"Endpoints": { | |
"Http": { | |
"Url": "http://localhost:5015" | |
}, | |
"Https": { | |
"Url": "https://localhost:5016", | |
"Certificate": { | |
"Path": "C:\\development\\localhost.p12", | |
"Password": "password here" | |
} | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static IHostBuilder CreateHostBuilder(string[] args) | |
{ | |
return Host.CreateDefaultBuilder(args) | |
.ConfigureWebHostDefaults(webBuilder => | |
{ | |
webBuilder.UseStartup<Startup>(); | |
webBuilder.UseKestrel((context, options) => | |
{ | |
options.Configure(context.Configuration.GetSection("Kestrel")); | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment