Skip to content

Instantly share code, notes, and snippets.

@manoj-choudhari-git
Created May 4, 2021 20:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manoj-choudhari-git/7fe6d374344406e6a06fa99db90c189c to your computer and use it in GitHub Desktop.
Save manoj-choudhari-git/7fe6d374344406e6a06fa99db90c189c to your computer and use it in GitHub Desktop.
UseUrls to set the URL Binding on Kestrel server
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseUrls("https://localhost:33333");
webBuilder.UseStartup<Startup>();
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment