aspnetcore

Framework

dotnet/aspnetcore

Cross-platform .NET framework for building modern cloud-based web apps.

Overview

ASP.NET Core is an open-source, cross-platform framework for building modern cloud-based internet-connected applications like web apps, IoT apps, and mobile backends. It runs on .NET and provides modular components with minimal overhead.

README Preview

ASP.NET Core\n============\n\n[](https://www.dotnetfoundation.org/)\n[](https://github.com/dotnet/aspnetcore/blob/main/LICENSE.txt) [](https://github.com/dotnet/aspnetcore/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) [](https://github.com/dotnet/aspnetcore/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)\n[](https://aka.ms/dotnet-discord)\n\nASP.NET Core is an open-source and cross-platform framework for building modern cloud-based internet-connected applications, such as web apps, IoT apps, and mobile backends. ASP.NET Core apps run on [.NET](https://dot.net), a free, cross-platform, and open-source application runtime. It was architected to provide an optimized development framework for apps that are deployed to the cloud or run on-premises. It consists of modular components with minimal overhead, so you retain flexibility while constructing your solutions. You can develop and run your ASP.NET Core apps cross-platform on Windows, Mac, and Linux. [Learn more about ASP.NET Core](https://learn.microsoft.com/aspnet/core/).\n\n## Get started\n\nFollow the [Getting Started](https://learn.microsoft.com/aspnet/core/getting-started) instructions.\n\nAlso check out the [.NET Homepage](https://www.microsoft.com/net) for released versions of .NET, getting started guides, and learning resources.\n\nSee the [Triage Process](https://github.com/dotnet/aspnetcore/blob/main/docs/TriageProcess.md) document for more information on how we handle incoming issues.\n\n## How to engage, contribute, and give feedback\n\nSome of the best ways to contribute are to try things out, file issues, join in design conversations,\nand make pull-requests.\n\n* [Download our latest daily builds](./docs/DailyBuilds.md)\n* Follow along with the development of ASP.NET Core:\n    * [Community Standup](https://live.asp.net): The community standup is held every week and streamed live on YouTube. You can view past standups in the linked playlist.\n    * [Roadmap](https://aka.ms/aspne

FAQ (5)

Troubleshooting
Why does .NET 10.0.11 suddenly include libmsalruntime.so and increase build size by 38 MB?

This is caused by a transitive dependency chain introduced in Microsoft.EntityFrameworkCore.SqlServer 10.0.11–10.0.13, which upgraded Microsoft.Data.SqlClient from 6.1.1 to 6.1.6. SqlClient 6.1.6 depends on Microsoft.Identity.Client.Broker 4.84.2, which pulls in Microsoft.Identity.Client.NativeInterop 0.20.6 — that package ships the 38 MB libmsalruntime.so in runtimes/linux-x64/native. You can verify the path with dotnet nuget why Microsoft.Identity.Client.NativeInterop. Workaround: explicitly reference Microsoft.Data.SqlClient version 7.1.1 (or later) in your project, which no longer includes this native dependency — libmsalruntime.so will disappear from the build output. EFCore.SqlServer is expected to upgrade to SqlClient 7.1.1 in a future release, which will resolve it without the manual override.

GitHub Issue #68568
Troubleshooting
Why is my rate limit policy not applied when using UseStatusCodePagesWithReExecute in ASP.NET Core?

This is a middleware ordering issue. If UseRateLimiter is registered before UseStatusCodePagesWithReExecute, the rate limiter sits outside the re-execution branch and won't evaluate the re-executed endpoint's policy.

Fix — register status-code-pages middleware BEFORE routing, and the rate limiter AFTER routing:

app.UseStatusCodePagesWithReExecute("/b");
app.UseRouting();
app.UseRateLimiter();

With this ordering, re-execution runs routing again and includes the rate limiter, so it reads the newly selected endpoint (e.g. /b), acquires a fresh lease, and rejects the request when no permits remain. Note: middleware placed before the status-code-pages middleware does not run again during re-execution.

GitHub Issue #69942
Troubleshooting
How to fix Blazor reconnection issues in .NET 10 that are fixed in .NET 11?

Upgrade to .NET SDK version 10.0.400 or later (released August 11). The reconnection fix originally made for .NET 11 was backported to the .NET 10 branch and shipped in this SDK version. If you still experience pause/resume or reconnection problems after updating, open a new issue on the dotnet/aspnetcore GitHub repository.

GitHub Issue #67257
Troubleshooting
Why does Blazor WASM with MSAL redirect to the app root after login instead of the requested ReturnUrl?

This is a regression in Microsoft.Authentication.WebAssembly.Msal 10.0.8–10.0.12. Concurrent calls such as getUser and getAccessToken can enter AuthenticationService.init before initialization completes, creating two MSAL instances. The first instance removes the saved returnUrl from sessionStorage; the second instance then completes sign-in without state, causing Blazor to fall back to Navigation.BaseUri.

Fix: upgrade to a patched release containing PRs #69735 and #69736. If a patched version is not yet available, temporarily downgrade to the last working version:

dotnet add package Microsoft.Authentication.WebAssembly.Msal --version 10.0.7

The underlying fix caches the initialization promise so concurrent callers share the same MSAL instance instead of each creating one and consuming the redirect state.

GitHub Issue #69734
Troubleshooting
Why did a custom IOutputCachePolicy stop caching authenticated responses after upgrading to ASP.NET Core 10.0.9?

This is a regression in ASP.NET Core 10.0.9 through at least 10.0.12. DefaultPolicy.ServeResponseAsync now sets AllowCacheStorage = false for authenticated users, overriding a custom policy that enabled caching in CacheRequestAsync.

Workaround: re-assert the flag in the custom policy's ServeResponseAsync, because custom policies run after the default policy:

public ValueTask ServeResponseAsync(OutputCacheContext context, CancellationToken cancellationToken)
{
    if (context.HttpContext.User?.Identity?.IsAuthenticated == true)
    {
        context.AllowCacheStorage = true;
    }

    return ValueTask.CompletedTask;
}

Keep the existing AllowCacheStorage = true and expiration/vary-by settings in CacheRequestAsync. Use this only for authenticated responses that are safe to share across users; configure appropriate CacheVaryByRules for user-specific data.

Permanent fix: upgrade to an ASP.NET Core release containing PR #69580 and its backports (#69725 for .NET 10, #69724 for .NET 11). Verify the installed runtime with dotnet --info.

GitHub Issue #69386