Initial commit

This commit is contained in:
Mark J Price 2022-03-15 11:01:57 +00:00
parent f7cc057037
commit f2066234b0
18 changed files with 98 additions and 18 deletions

View file

@ -4,8 +4,10 @@
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<!--remove the element below after GA release-->
<!--remove the elements below after GA release-->
<LangVersion>preview</LangVersion>
<EnablePreviewFeatures>true</EnablePreviewFeatures>
</PropertyGroup>
<ItemGroup>

View file

@ -1,3 +1,4 @@
using Microsoft.AspNetCore.Server.Kestrel.Core; // HttpProtocols
using Packt.Shared; // AddNorthwindContext extension method
// configure services
@ -5,6 +6,16 @@ using Packt.Shared; // AddNorthwindContext extension method
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddRazorPages();
builder.Services.AddNorthwindContext();
builder.WebHost.ConfigureKestrel((context, options) =>
{
options.ListenAnyIP(5001, listenOptions =>
{
listenOptions.Protocols = HttpProtocols.Http1AndHttp2AndHttp3;
listenOptions.UseHttps(); // HTTP/3 requires secure connections
});
});
var app = builder.Build();
// configure the HTTP pipeline

View file

@ -2,7 +2,8 @@
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
"Microsoft.AspNetCore": "Warning",
"Microsoft.AspNetCore.Hosting.Diagnostics": "Information"
}
},
"AllowedHosts": "*"