diff --git a/aspnetcore-features/HowToSetupDeveloperHttpsCertificate/HowToSetupDeveloperHttpsCertificate/HowToSetupDeveloperHttpsCertificate.csproj b/aspnetcore-features/HowToSetupDeveloperHttpsCertificate/HowToSetupDeveloperHttpsCertificate/HowToSetupDeveloperHttpsCertificate.csproj index d324660332..424b588a67 100644 --- a/aspnetcore-features/HowToSetupDeveloperHttpsCertificate/HowToSetupDeveloperHttpsCertificate/HowToSetupDeveloperHttpsCertificate.csproj +++ b/aspnetcore-features/HowToSetupDeveloperHttpsCertificate/HowToSetupDeveloperHttpsCertificate/HowToSetupDeveloperHttpsCertificate.csproj @@ -1,14 +1,13 @@ - net7.0 + net11.0 enable enable - - + diff --git a/aspnetcore-features/HowToSetupDeveloperHttpsCertificate/HowToSetupDeveloperHttpsCertificate/Program.cs b/aspnetcore-features/HowToSetupDeveloperHttpsCertificate/HowToSetupDeveloperHttpsCertificate/Program.cs index 48863a6d6c..666a9c543c 100644 --- a/aspnetcore-features/HowToSetupDeveloperHttpsCertificate/HowToSetupDeveloperHttpsCertificate/Program.cs +++ b/aspnetcore-features/HowToSetupDeveloperHttpsCertificate/HowToSetupDeveloperHttpsCertificate/Program.cs @@ -3,17 +3,15 @@ // Add services to the container. builder.Services.AddControllers(); -// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle -builder.Services.AddEndpointsApiExplorer(); -builder.Services.AddSwaggerGen(); +// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi +builder.Services.AddOpenApi(); var app = builder.Build(); // Configure the HTTP request pipeline. if (app.Environment.IsDevelopment()) { - app.UseSwagger(); - app.UseSwaggerUI(); + app.MapOpenApi(); } app.UseHttpsRedirection(); diff --git a/aspnetcore-features/HowToSetupDeveloperHttpsCertificate/HowToSetupDeveloperHttpsCertificate/Properties/launchSettings.json b/aspnetcore-features/HowToSetupDeveloperHttpsCertificate/HowToSetupDeveloperHttpsCertificate/Properties/launchSettings.json index 740a481257..7ddbec9ebe 100644 --- a/aspnetcore-features/HowToSetupDeveloperHttpsCertificate/HowToSetupDeveloperHttpsCertificate/Properties/launchSettings.json +++ b/aspnetcore-features/HowToSetupDeveloperHttpsCertificate/HowToSetupDeveloperHttpsCertificate/Properties/launchSettings.json @@ -1,20 +1,12 @@ { "$schema": "https://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:40250", - "sslPort": 44379 - } - }, "profiles": { "http": { "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, - "launchUrl": "swagger", - "applicationUrl": "http://localhost:5018", + "launchUrl": "weatherforecast", + "applicationUrl": "http://localhost:5199", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } @@ -23,16 +15,8 @@ "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, - "launchUrl": "swagger", - "applicationUrl": "https://localhost:7073;http://localhost:5018", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "swagger", + "launchUrl": "weatherforecast", + "applicationUrl": "https://localhost:7175;http://localhost:5199", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" }