diff --git a/frameworks/CSharp/aspnetcore/appsettings.postgresql.json b/frameworks/CSharp/aspnetcore/appsettings.postgresql.json
index abc42e6ce8a..423af4d19b0 100644
--- a/frameworks/CSharp/aspnetcore/appsettings.postgresql.json
+++ b/frameworks/CSharp/aspnetcore/appsettings.postgresql.json
@@ -1,4 +1,4 @@
{
- "ConnectionString": "Server=tfb-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;SSL Mode=Disable;Maximum Pool Size=18;NoResetOnClose=true;Enlist=false;Max Auto Prepare=4;Multiplexing=true;Write Coalescing Buffer Threshold Bytes=1000",
+ "ConnectionString": "Server=tfb-database;Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;SSL Mode=Disable;Maximum Pool Size=512;NoResetOnClose=true;Enlist=false;Max Auto Prepare=4",
"Database": "postgresql"
}
diff --git a/frameworks/CSharp/aspnetcore/aspnetcore-aot.dockerfile b/frameworks/CSharp/aspnetcore/aspnetcore-aot.dockerfile
index a114ee58727..a7396e3b919 100644
--- a/frameworks/CSharp/aspnetcore/aspnetcore-aot.dockerfile
+++ b/frameworks/CSharp/aspnetcore/aspnetcore-aot.dockerfile
@@ -1,12 +1,12 @@
-FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
+FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
RUN apt-get update
RUN apt-get -yqq install clang zlib1g-dev
WORKDIR /app
COPY src/Platform .
RUN dotnet publish -c Release -o out /p:DatabaseProvider=Npgsql /p:PublishAot=true /p:OptimizationPreference=Speed /p:GarbageCollectionAdaptationMode=0
-FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
-ENV URLS http://+:8080
+FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime
+ENV URLS=http://+:8080
WORKDIR /app
COPY --from=build /app/out ./
diff --git a/frameworks/CSharp/aspnetcore/aspnetcore-minimal.dockerfile b/frameworks/CSharp/aspnetcore/aspnetcore-minimal.dockerfile
index 5ab25aa2bb9..24893c9717a 100644
--- a/frameworks/CSharp/aspnetcore/aspnetcore-minimal.dockerfile
+++ b/frameworks/CSharp/aspnetcore/aspnetcore-minimal.dockerfile
@@ -1,10 +1,13 @@
-FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
+FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
WORKDIR /app
COPY src/Minimal .
RUN dotnet publish -c Release -o out
-FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
+FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime
ENV URLS http://+:8080
+ENV DOTNET_GCDynamicAdaptationMode=0
+ENV DOTNET_ReadyToRun=0
+ENV DOTNET_HillClimbing_Disable=1
WORKDIR /app
COPY --from=build /app/out ./
diff --git a/frameworks/CSharp/aspnetcore/aspnetcore-mvc.dockerfile b/frameworks/CSharp/aspnetcore/aspnetcore-mvc.dockerfile
index b0d126973cb..6922a53bf2a 100644
--- a/frameworks/CSharp/aspnetcore/aspnetcore-mvc.dockerfile
+++ b/frameworks/CSharp/aspnetcore/aspnetcore-mvc.dockerfile
@@ -1,10 +1,13 @@
-FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
+FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
WORKDIR /app
COPY src/Mvc .
RUN dotnet publish -c Release -o out
-FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
+FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime
ENV URLS http://+:8080
+ENV DOTNET_GCDynamicAdaptationMode=0
+ENV DOTNET_ReadyToRun=0
+ENV DOTNET_HillClimbing_Disable=1
WORKDIR /app
COPY --from=build /app/out ./
diff --git a/frameworks/CSharp/aspnetcore/aspnetcore-mysql.dockerfile b/frameworks/CSharp/aspnetcore/aspnetcore-mysql.dockerfile
index 505414aa173..ecc0a8331c3 100644
--- a/frameworks/CSharp/aspnetcore/aspnetcore-mysql.dockerfile
+++ b/frameworks/CSharp/aspnetcore/aspnetcore-mysql.dockerfile
@@ -1,10 +1,13 @@
-FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
+FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
WORKDIR /app
COPY src/Platform .
RUN dotnet publish -c Release -o out /p:DatabaseProvider=MySqlConnector
-FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
+FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime
ENV URLS http://+:8080
+ENV DOTNET_GCDynamicAdaptationMode=0
+ENV DOTNET_ReadyToRun=0
+ENV DOTNET_HillClimbing_Disable=1
WORKDIR /app
COPY --from=build /app/out ./
diff --git a/frameworks/CSharp/aspnetcore/aspnetcore.dockerfile b/frameworks/CSharp/aspnetcore/aspnetcore.dockerfile
index 5a846103428..64510ffe786 100644
--- a/frameworks/CSharp/aspnetcore/aspnetcore.dockerfile
+++ b/frameworks/CSharp/aspnetcore/aspnetcore.dockerfile
@@ -1,10 +1,13 @@
-FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
+FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
WORKDIR /app
COPY src/Platform .
RUN dotnet publish -c Release -o out /p:DatabaseProvider=Npgsql
-FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
-ENV URLS http://+:8080
+FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime
+ENV URLS=http://+:8080
+ENV DOTNET_GCDynamicAdaptationMode=0
+ENV DOTNET_ReadyToRun=0
+ENV DOTNET_HillClimbing_Disable=1
WORKDIR /app
COPY --from=build /app/out ./
diff --git a/frameworks/CSharp/aspnetcore/src/Minimal/Minimal.csproj b/frameworks/CSharp/aspnetcore/src/Minimal/Minimal.csproj
index 783ec88ff32..01ed70de876 100644
--- a/frameworks/CSharp/aspnetcore/src/Minimal/Minimal.csproj
+++ b/frameworks/CSharp/aspnetcore/src/Minimal/Minimal.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net9.0
enable
enable
latest
@@ -9,9 +9,9 @@
-
-
-
+
+
+
diff --git a/frameworks/CSharp/aspnetcore/src/Minimal/Program.cs b/frameworks/CSharp/aspnetcore/src/Minimal/Program.cs
index 9ac63edcca2..7aaac6db1ac 100644
--- a/frameworks/CSharp/aspnetcore/src/Minimal/Program.cs
+++ b/frameworks/CSharp/aspnetcore/src/Minimal/Program.cs
@@ -1,13 +1,11 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-using System.Text.Encodings.Web;
-using System.Text.Unicode;
-using Microsoft.AspNetCore.Http.HttpResults;
-using RazorSlices;
using Minimal;
using Minimal.Database;
using Minimal.Models;
+using System.Text.Encodings.Web;
+using System.Text.Unicode;
var builder = WebApplication.CreateBuilder(args);
@@ -36,14 +34,14 @@
app.MapGet("/db", async (Db db) => await db.LoadSingleQueryRow());
-var createFortunesTemplate = RazorSlice.ResolveSliceFactory>("/Templates/Fortunes.cshtml");
var htmlEncoder = CreateHtmlEncoder();
app.MapGet("/fortunes", async (HttpContext context, Db db) => {
var fortunes = await db.LoadFortunesRows();
- var template = (RazorSliceHttpResult>)createFortunesTemplate(fortunes);
- template.HtmlEncoder = htmlEncoder;
- return template;
+ var result = Results.Extensions.RazorSlice>(fortunes);
+ result.HtmlEncoder = htmlEncoder;
+
+ return result;
});
app.MapGet("/queries/{count?}", async (Db db, string? count) => await db.LoadMultipleQueriesRows(count));
diff --git a/frameworks/CSharp/aspnetcore/src/Minimal/Templates/Fortunes.cshtml b/frameworks/CSharp/aspnetcore/src/Minimal/Slices/Fortunes.cshtml
similarity index 100%
rename from frameworks/CSharp/aspnetcore/src/Minimal/Templates/Fortunes.cshtml
rename to frameworks/CSharp/aspnetcore/src/Minimal/Slices/Fortunes.cshtml
diff --git a/frameworks/CSharp/aspnetcore/src/Minimal/Templates/_ViewImports.cshtml b/frameworks/CSharp/aspnetcore/src/Minimal/Slices/_ViewImports.cshtml
similarity index 100%
rename from frameworks/CSharp/aspnetcore/src/Minimal/Templates/_ViewImports.cshtml
rename to frameworks/CSharp/aspnetcore/src/Minimal/Slices/_ViewImports.cshtml
diff --git a/frameworks/CSharp/aspnetcore/src/Mvc/Mvc.csproj b/frameworks/CSharp/aspnetcore/src/Mvc/Mvc.csproj
index 5bffd479c0f..83105ed34be 100644
--- a/frameworks/CSharp/aspnetcore/src/Mvc/Mvc.csproj
+++ b/frameworks/CSharp/aspnetcore/src/Mvc/Mvc.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net9.0
enable
enable
latest
@@ -9,8 +9,8 @@
-
-
+
+
diff --git a/frameworks/CSharp/aspnetcore/src/Platform/Platform.csproj b/frameworks/CSharp/aspnetcore/src/Platform/Platform.csproj
index 548e446ee0a..ef14e44b865 100644
--- a/frameworks/CSharp/aspnetcore/src/Platform/Platform.csproj
+++ b/frameworks/CSharp/aspnetcore/src/Platform/Platform.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net9.0
true
true
preview
@@ -19,9 +19,9 @@
-
-
-
+
+
+
diff --git a/frameworks/CSharp/aspnetcore/src/Platform/Program.cs b/frameworks/CSharp/aspnetcore/src/Platform/Program.cs
index 9b22d3f5b40..28fc5d757dd 100644
--- a/frameworks/CSharp/aspnetcore/src/Platform/Program.cs
+++ b/frameworks/CSharp/aspnetcore/src/Platform/Program.cs
@@ -52,7 +52,6 @@ public static IWebHost BuildWebHost(string[] args)
#if DEBUG
.AddUserSecrets()
#endif
- .AddEnvironmentVariables()
.AddEnvironmentVariables()
.AddCommandLine(args)
.Build();