/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Servers/HttpSys/samples/SelfHostServer/Program.cs
31 строка
1 KB
Pranav K
Fixup whitespace issues from top-level statement change (#39161)
23 дек 2021, 09:35
Не верифицирован
23 дек 2021, 09:35
c65dac7
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Server.HttpSys; using Microsoft.Extensions.Hosting; namespace SelfHostServer; public static class Program { public static void Main(string[] args) { CreateHostBuilder(args).Build().Run(); } public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .ConfigureWebHost(webBuilder => { webBuilder.UseStartup<Startup>() .UseHttpSys(options => { options.UrlPrefixes.Add("http://localhost:5000"); // This is a pre-configured IIS express port. See the PackageTags in the csproj. options.UrlPrefixes.Add("https://localhost:44319"); options.Authentication.Schemes = AuthenticationSchemes.None; options.Authentication.AllowAnonymous = true; }); }); }