Azure / azure-relay-aspnetserver

ASP.NET Core Hosting for Azure Relay
Other
15 stars 27 forks source link

Use generic host builder rather than webhost #23

Open VoIPTools opened 4 years ago

VoIPTools commented 4 years ago

Is it true that with .Net Core 3.1 we are encouraged to use the generic host builder rather than the web host builder? If so, how? In the sample code for selfhost it shows:

        var host = new WebHostBuilder()
            .ConfigureLogging(factory => factory.AddConsole())
            .UseStartup<Startup>()
            .UseAzureRelay(options =>
            {
                options.UrlPrefixes.Add(connectionString);
            })
            .Build();

.UseAzureRelay(options... is not available for the generic host builder