Skip to content
CAI
Software that uses CAICheck a score

dodyg/practical-aspnetcore

37.4

Weak · 12 November 2026

22.1k

lines of production code

C#

primary language

6

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a comprehensive collection of sample applications and documentation for the .NET ecosystem, primarily focusing on ASP.NET Core and Blazor. It demonstrates a wide range of capabilities including server-side and client-side rendering, gRPC communication, workflow orchestration, and modern frontend integration with HTMX and Datastar. The repository serves as a practical reference for implementing core framework features such as dependency injection, configuration, routing, and middleware in various hosting models.

How it got here

2017–2019 — comprehensive sample expansion and .NET modernization

119 changes.

This period focused on significantly expanding the repository's sample coverage by introducing new applications for Blazor Server, gRPC, Orchard Core, and various ASP.NET Core features like endpoint routing and localization. Concurrently, the project underwent extensive modernization, migrating existing samples to newer .NET versions (up to .NET 10) and adopting the minimal hosting model to reflect current development practices.

2020–2021 — ASP.NET Core 6 minimal hosting migration and sample expansion

139 changes.

This period focused on migrating existing ASP.NET Core samples to the .NET 6 minimal hosting model and expanding the repository with new demonstrations for localization, middleware, and JSON handling. It also introduced samples for emerging technologies like gRPC-Web, Blazor Server, and Orleans, alongside utilities for URI helpers and static file serving.

2022–2024 — comprehensive sample expansion and modernization

115 changes.

This period focused on significantly expanding the repository's sample library to cover a wide array of ASP.NET Core features, including minimal APIs, Blazor, HTMX, and Orleans. It also involved updating existing samples to align with newer .NET versions and replacing third-party dependencies with built-in framework capabilities like OpenAPI and Scalar.

2025–2026 — ASP.NET Core 11 and HTMX 4 sample expansion

38 changes.

This period focused on creating comprehensive sample projects for ASP.NET Core 11 and HTMX 4, covering new features like the HTTP QUERY method, OpenAPI 3.2 support, Blazor SSR enhancements, and various HTMX extensions. The work included demonstrating native OpenTelemetry tracing, CSRF protection, and advanced caching strategies, while also updating existing samples for .NET 10 and fixing endpoint filter binding behaviors.

Features

Add .NET 10 Server-Sent Events sample

A new sample project demonstrates ASP.NET Core 10's built-in Server-Sent Events support. The sample uses \Results.ServerSentEvents()\ with an \IAsyncEnumerable\<string\>\ to stream updates, handling the \text/event-stream\ accept header and providing a client-side HTML page to display the events.

projects/sse · high confidence

Add .NET 6 Blazor Server 'Hello World' sample

A new 'Hello World' sample application has been added to the Blazor Server project, demonstrating the simplest Razor component app structure. The sample uses the .NET 6 minimal hosting model (Program.cs) to configure Razor Pages, Server-Side Blazor, HTTPS redirection, static files, and routing, providing a clear starting point for understanding the building blocks of a Razor component application.

projects/blazor-ss/HelloWorld · high confidence

Add .NET 6 MVC localization sample with French resource support

This location introduces a new ASP.NET Core MVC application demonstrating localization using the top-level statements and minimal hosting model introduced in .NET 6. The app configures French (fr-FR) as the default and supported culture, serving static HTML content that displays localized strings ('Bonjour Mon Ami', 'Au Revoir') from a ResX file named according to the full type path (MvcLocalization.HomeController.fr.resx) to handle the mismatch between the assembly name and the namespace. It also includes VS Code launch and build task configurations to support debugging and building the project.

projects/localization/localization-1, projects/mvc/localization/mvc-localization-2 · high confidence

Add .NET 6 MVC localization sample with French resources

The mvc-localization-4 project now provides a minimal ASP.NET Core MVC application demonstrating shared resource localization. It configures the app to support French (fr-FR) as the default and only culture, using the new minimal hosting model in Program.cs. The sample includes a French resource file (Global.fr.resx) with translations for "Hello", "Goodbye", "Yes", and "No", and displays the requested culture and localized text on the Home and About pages. VS Code launch and task configurations have been added to support building and debugging the project.

projects/mvc/localization/mvc-localization-4 · high confidence

Add .NET 6 Razor Pages handler sample

A new sample project demonstrating a Razor Pages handler has been added to the handler location. It includes a minimal Program.cs entry point, an Index page that displays the HTTP method used for GET and POST requests, and VS Code configuration files for building and debugging the application.

projects/razor-pages/handler · high confidence

Add .NET 6 Razor Pages samples for markup in functions

Added two new Razor Pages samples demonstrating the ability to use HTML markup inside C\# functions. The first sample (razor-1) shows markup within methods defined in a @functions block, while the second (razor-2) demonstrates markup inside local functions defined within a code block. Both samples are built on .NET 6.

projects/razor-pages/razor · high confidence

Add .NET 6 WebSocket chat sample application

Introduces a new WebSocket-based chat application in the web-sockets-5 project, upgraded to .NET 6. The app provides a command-line interface for users to set nicknames, list connected users, send private messages, and disconnect, served via an embedded HTML/JS client.

projects/web-sockets/web-sockets-5 · high confidence

Add .NET 6 WebSocket sample with echo and broadcast capabilities

A new sample application has been added to the web-sockets-4 project, demonstrating WebSocket functionality using the .NET 6 minimal hosting model. The application provides a web interface that allows users to connect via multiple browser tabs to test real-time communication features, specifically an echo service that replies to individual messages and a broadcast service that sends messages to all connected clients simultaneously.

projects/web-sockets/web-sockets-4 · high confidence

Add .NET 6 application lifetime demo project

A new project has been added to demonstrate application lifecycle management in .NET 6. The project registers handlers for the ApplicationStarted, ApplicationStopping, and ApplicationStopped events to log server status changes to the console, while serving a simple 'Hello world' response via the web server.

projects/i-application-lifetime · high confidence

Add .NET 6 endpoint routing sample using minimal APIs

A new sample project has been added to demonstrate endpoint routing in .NET 6, specifically showing how to use \RequestDelegate\ directly with minimal API methods like \MapGet\. The sample includes the necessary Visual Studio Code configuration files (launch and tasks) and a README explaining the usage of \MapGet\, \MapPost\, \MapPut\, and \MapDelete\.

projects/endpoint-routing/new-routing-4 · high confidence

Add .NET 6 endpoint routing sample using minimal hosting model

A new sample project has been added to demonstrate endpoint routing with the .NET 6 minimal hosting model. The sample shows how to use \RequestDelegate\ directly via \app.Map\ to handle requests, including manual HTTP verb checks, which is useful for methods like PATCH that lack dedicated helper methods. The project includes configuration files for VS Code debugging and building.

projects/endpoint-routing/new-routing-5 · high confidence

Add .NET 6 endpoint-routing sample application

A new sample application demonstrating endpoint routing in .NET 6 has been added to the project. The application uses the minimal hosting model to configure controllers and views, and includes a middleware component that utilizes the LinkGenerator service to construct a URI for a specific controller action (HelloController.World) and returns the generated URL in the response.

projects/endpoint-routing/endpoint-routing-2 · high confidence

Add .NET 6 endpoint-routing sample with minimal hosting

A new sample project (projects/endpoint-routing/new-routing-3) demonstrates enabling only MVC with the default controller route ({controller=Home}/{action=Index}/{id?}) using the minimal hosting model (WebApplication.CreateBuilder/Build/Run). Razor Pages are not supported in this sample. The project targets .NET 6 and includes VS Code launch/tasks configurations and a README explaining the behavior.

projects/endpoint-routing/new-routing-3 · high confidence

The localization-4 sample now targets .NET 6 and implements a minimal ASP.NET Core application that demonstrates culture switching via cookies. Users can toggle between French (fr-FR) and English (en-US) by appending ?lang=fr or ?lang=en to the URL, which sets a cookie and redirects to the home page. The app displays localized strings (Hello, Goodbye, Yes, No) from resource files and defaults to French if no language is specified.

projects/localization/localization-4 · high confidence

Add .NET 6 localization sample with culture-aware UI

The localization-3 project now uses the .NET 6 minimal hosting model to demonstrate ASP.NET Core localization. It configures supported cultures (en-US, en-GB) and provides a web page that displays localized strings based on the UI culture while showing date formatting based on the request culture, allowing users to toggle between culture and UI culture settings via query parameters.

projects/localization/localization-3 · high confidence

Add .NET 6 localization sample with query-string culture switching

The localization-2 sample now uses the .NET 6 minimal hosting model to demonstrate ASP.NET Core localization. It configures supported cultures (French and English) and allows users to switch the display language via query-string parameters (culture and ui-culture), with localized strings for 'Hello', 'Goodbye', 'Yes', and 'No' provided in English and French resource files.

projects/localization/localization-2 · high confidence

Add .NET 6 minimal API entry point

The configuration-1 project now includes a Program.cs file implementing a minimal API using .NET 6. This entry point initializes a web application, sets a configuration value for a message, and exposes it via an HTTP response, establishing the runtime foundation for this configuration.

projects/configurations/configuration-1 · high confidence

Add .NET 6 minimal API sample with custom Tag Helpers

A new sample project has been added that demonstrates a .NET 6 minimal API setup using the WebApplication builder pattern. It includes custom Tag Helpers (HelloHelper, WorldHelper, AlertHelper) that render specific HTML elements, and a view that utilizes these helpers along with Bootstrap 5 for styling to display a greeting and a random cat image.

projects/mvc/tag-helper/tag-helper-4 · high confidence

Add .NET 6 portable localization sample with Italian default

The localization-5 project now targets .NET 6 and implements a web application using portable localization (PO files). It defaults to the Italian (it-IT) culture and supports English and French translations for the 'Hello' string, allowing users to see localized responses based on the request's UI culture.

projects/localization/localization-5 · high confidence

Add .NET 6 portable localization sample with multi-language support

Introduces a new .NET 6 Web API sample in the localization-6 project that demonstrates portable object localization. The application supports Italian (it-IT) by default and includes translation files (PO) for English, French, and Italian, allowing users to see localized greetings for 'Friend' and 'Lover' contexts based on the request culture.

projects/localization/localization-6 · high confidence

Add .NET 6 request localization feature

The project now targets .NET 6 and includes a new Program.cs that implements request localization. Users can now see the detected culture of their request displayed in the response, leveraging the standard ASP.NET Core localization middleware.

projects/features/features-request-culture · high confidence

Add .NET 6 sample demonstrating JsonIgnore condition behaviors

A new sample project in projects/json/json-10 demonstrates how to control JSON serialization using the \[JsonIgnore\] attribute with various conditions (Always, Never, WhenWritingNull, WhenWritingDefault). The sample uses .NET 6 and System.Text.Json to show how properties like Age, IsMarried, CurrentTime, IsWorking, and IsHealthy are handled during serialization based on their values and configured conditions.

projects/json/json-10 · high confidence

Add .NET 6 sample demonstrating System.Text.Json serialization with Dictionary\<string, object\>

A new sample project has been added to demonstrate serializing complex JSON structures using System.Text.Json in .NET 6. The sample includes a Web API endpoint that returns a Person object containing a Dictionary\<string, object\> field, illustrating how to handle ad-hoc objects, arrays of primitives, and mixed object arrays. It also showcases configuration options such as indented output, camel-case naming policies, and ignoring null values.

projects/json/json-5 · high confidence

Add .NET 6 sample demonstrating custom snake\_case JSON naming policy

The project now targets .NET 6 and includes a new sample application that serializes objects using System.Text.Json with a custom SnakeCaseNamingPolicy. This policy converts property names to snake\_case, allowing users to see how to implement and apply custom naming conventions in modern .NET applications.

projects/json/json-7 · high confidence

Add .NET 6 sample for manual JSON serialization

A new sample project has been added to demonstrate manual JSON document construction using \Utf8JsonWriter\ in .NET 6. This sample shows how to write various data types, including strings, numbers, dates, objects, and arrays, directly to a response stream.

projects/json/json-6 · high confidence

Add .NET 6 sample for resolving MIME types via file extension

A new sample application has been added to the utils folder that demonstrates how to use \FileExtensionContentTypeProvider\ to determine the MIME type for a given file extension. The app runs on .NET 6 and displays a simple HTML page listing the resolved MIME types for common extensions like .pdf, .doc, .docx, and .json.

projects/utils/media-type-names-2 · high confidence

Add .NET Core MVC localization sample with French language support

This change introduces a new MVC application sample that demonstrates server-side localization using shared resources. The application is configured to support French (fr-FR) as the default and only supported culture, serving translated strings for 'Hello', 'Goodbye', 'Yes', and 'No' from a ResX file. The home page view displays the requested culture and the localized text, and the project includes standard VS Code debugging and build task configurations to facilitate local development.

projects/mvc/localization/mvc-localization-5 · high confidence

Add API Problem Details demonstration project

A new ASP.NET Core MVC application has been added to demonstrate the use of Microsoft.AspNetCore.Mvc.ProblemDetails for describing errors in web APIs. The project includes a HomeController that catches exceptions and returns a standardized ProblemDetails response, implementing the RFC 7807 specification to provide consistent error information to clients.

projects/mvc/api-problem-details · high confidence

Add API Problem Details extension for structured error responses

The project now includes a new Program.cs file that sets up an ASP.NET Core MVC application with a custom \ApiProblemDetails\ extension method. This feature allows controllers to return structured error responses that include standard problem details along with additional context such as the request path, validation messages, and, in development environments, exception messages and stack traces.

projects/mvc/api-problem-details-2 · high confidence

Add ASP.NET Core 11 sample with OpenAPI 3.2 and Scalar UI

A new sample project demonstrates OpenAPI 3.2 support for HTTP Query parameters in ASP.NET Core 11. The application generates an OpenAPI document and provides an interactive API reference interface using Scalar. It includes a basic search endpoint to illustrate the new OpenAPI specification features.

projects/net11/open-api-12 · high confidence

Add ASP.NET Core 9 samples for TypedResults and OpenAPI

This location introduces new sample projects demonstrating ASP.NET Core 9 capabilities. The typed-results-2 sample illustrates the new TypedResults.InternalServerError method for returning HTTP 500 status codes. The open-api-3 sample demonstrates the built-in OpenAPI document generator, replacing the need for third-party packages like NSwag for generation. The open-api-4 sample extends this by showing how to use the NSwag UI to visualize the API documentation generated by the built-in tool. These samples require the .NET 9.0.100 SDK.

projects/net9 · high confidence

Add ASP.NET Core MVC routing sample application

A new sample application has been added to demonstrate ASP.NET Core MVC routing. The application configures controller-based routing with two specific routes: a home route at the root path (/) and a default route pattern ({controller}/{action}). It includes a HomeController that renders a static HTML page displaying a welcome message and links to verify that different URL patterns correctly resolve to the same controller action.

projects/mvc/routing/routing-1 · high confidence

Add ASP.NET Core exception handler examples

Added demo projects for the \IExceptionHandler\ interface in ASP.NET Core. The \iexception-handler\ example demonstrates registering a single default exception handler, while \iexception-handler-2\ shows how to register multiple handlers (specifically \TimeOutHandler\ and \DefaultExceptionHandler\) and highlights that the order of registration determines which handler processes the exception first.

projects/exception-handler-middleware · high confidence

Add ASP.NET Core sample demonstrating htmx out-of-band swaps with hx-select-oob

This location introduces a new ASP.NET Core web application that serves as a demonstration for the htmx \hx-select-oob\ attribute. The sample application allows users to trigger GET, POST, PUT, PATCH, and DELETE requests via list items, showing how the client can select specific elements from the server response to swap into the DOM out-of-band. It includes the necessary server-side routing, anti-forgery token handling for non-GET requests, and client-side configuration to ensure secure request submission.

projects/htmx/select-oob · high confidence

Add ASP.NET Core sample demonstrating hx-select with multiple selectors

A new ASP.NET Core sample application has been added to the htmx samples collection to demonstrate the \hx-select\ attribute using multiple selectors (e.g., \\#result,\#result2,.results\). The sample includes a web server that handles GET, POST, PUT, PATCH, and DELETE requests, returning HTML fragments with specific IDs and classes. It also illustrates how to configure htmx v4 for anti-forgery token handling via JavaScript and the server-side antiforgery middleware, allowing users to see how partial responses are selectively injected into the DOM based on the defined selectors.

projects/htmx/select-2 · high confidence

Add Blazor SSR samples demonstrating multi-render, streaming, and MVC integration

The \projects/blazor-ssr\ directory now contains a collection of sample applications illustrating various Blazor rendering strategies. These include multi-rendering setups combining static SSR with interactive WebAssembly or Server-side components (RazorComponentSeven, RazorComponentEight, RazorComponentTen), streaming rendering updates (RazorComponentEleven), and integration with ASP.NET Core MVC using \RazorComponentResult\ and \Html.RenderComponentAsync\ (RazorComponentFour, RazorComponentFive, RazorComponentSix). Additional samples demonstrate query parameter binding via \\[SupplyParameterFromQuery\]\ (RazorComponentNine) and basic SSR routing (RazorComponentOne).

projects/blazor-ssr · high confidence

Add Blazor Server Dependency Injection sample

A new Blazor Server sample has been added to demonstrate the behavior of Transient, Scoped, and Singleton service lifetimes. The application includes a UI that allows users to interact with injected services and observe how their state persists or resets across different browser tabs and requests, highlighting the impact of the single WebSocket connection on scoped services.

projects/blazor-ss/DependencyInjection · high confidence

Add Blazor Server JS Integration sample

A new sample project has been added to demonstrate how to access JavaScript functions available at the \window\ global scope from a Blazor Server application.

projects/blazor-ss/JsIntegration · high confidence

Add Blazor Server Layout sample application

A new Blazor Server application has been added to demonstrate the use of layout and nested layouts within a Razor Component app. The project includes a minimal host setup using the WebApplication builder pattern, configuring Razor Pages, Server-side Blazor, HTTPS redirection, and static files, along with documentation explaining the layout features.

projects/blazor-ss/Layout · high confidence

Add Blazor Server RSS Reader sample application

A new Blazor Server application has been added to fetch and display RSS feed items from an external source. The app uses the Microsoft.SyndicationFeed library to parse XML on the server and renders the results in the browser, utilizing MarkupString to safely display unescaped HTML content within the news descriptions.

projects/blazor-ss/RssReader · high confidence

Add Blazor Server chat component with SignalR broadcast

Introduces a new Blazor Server chat interface in the ChatR project that enables real-time message broadcasting via SignalR. Users can connect to the service, enter a username, and send broadcast messages that are received across open windows, with UI updates handled through the NotificationService.

projects/blazor-ss/ChatR/Components · high confidence

Add Blazor Server localization sample with PO file support

This location introduces a sample application demonstrating how to implement localization in Blazor Server using Portable Object (PO) files via the OrchardCore.Localization.Core package. Users can now view localized strings and plural forms on the Index page, and switch between English and French cultures using a cookie-based provider configured in Program.cs.

projects/blazor-ss/Localization-2 · high confidence

Add Blazor Server localization sample with language switching

This location introduces a sample Blazor Server application demonstrating how to implement localization using global resources. It includes the core Razor components (App, Index) and a Razor Pages controller (Switch) that manages culture switching via cookies, allowing users to toggle between English and French. The setup configures supported cultures (fr-FR, en, fr) with French as the default, utilizes IStringLocalizer for resource injection, and provides corresponding .resx files for English and French translations.

projects/blazor-ss/Localization · high confidence

Add Blazor Server page layout and view imports

The application now includes the necessary Razor view files to render the main page. A new Index.cshtml file defines the HTML structure, including Bootstrap 5 styling and the Blazor Server script, while \_ViewImports.cshtml configures the namespace and tag helpers required for the page components.

projects/blazor-ss/HelloWorld/Pages · high confidence

Add Blazor Server sample using EventAggregator for cross-component communication

This location introduces a new Blazor Server sample application that demonstrates how to use the Blazor.EventAggregator library to handle communication between components and pages. The sample includes a parent page and a child component that publish notification messages, which are received and displayed by a shared notification component via an injected IEventAggregator service.

projects/blazor-ss/ComponentEvents-2 · high confidence

Add Blazor Server samples and build scripts

This change introduces a collection of sample applications for Blazor Server, including examples for RSS reading (with IAsyncEnumerable support), JavaScript interop, dependency injection, layout, multiple starting points, component events, localization (including PO files and RTL/LTR support), and RenderTreeBuilder usage. It also adds README documentation describing these samples and build scripts (build.bat and build.sh) to facilitate building the sample projects.

projects/blazor-ss · high confidence

Add Bootstrap 5 layout template for static file hosting

The static-files host now includes a shared layout view (\_Layout.cshtml) that provides a responsive page structure using Bootstrap 5.1.3. This template renders the main content body and supports optional inline CSS and JavaScript sections, establishing a consistent visual foundation for static file serving pages.

projects/orchard-core/static-files/Host/Views · high confidence

Add CoreWCF Hello World sample

A new 'Hello World' sample (corewcf-1) has been added to the CoreWCF project, demonstrating a simple request/response flow over HTTP using SOAP. The sample includes a server that hosts an echo service via CoreWCF and a client that consumes it using System.ServiceModel.Primitives, providing a concrete example of how to set up and interact with a CoreWCF service.

projects/corewcf · high confidence

Add Datastar hypermedia framework samples for .NET 10

The projects/datastar directory now includes a comprehensive set of .NET 10 Minimal API samples demonstrating the Datastar hypermedia framework. These examples cover core Datastar directives including data-bind, data-class, data-computed, data-effect, data-attr, data-show, and data-ignore, as well as advanced Server-Sent Events (SSE) patterns like patch-signals, patch-elements, and signal filtering. The samples illustrate how to integrate Datastar with the Pico CSS framework to build reactive UIs that update via backend SSE streams.

projects/datastar · high confidence

Add Elsa workflow samples for .NET 8

The \projects/elsa\ directory now includes a comprehensive set of runnable samples demonstrating the Elsa workflow engine on .NET 8. These samples cover core workflow patterns including conditional logic (If), loops (For, ForEach, While), parallel execution (Fork), and state management (SetVariable, ReadLine). The collection also provides examples for advanced features such as Composite activities, custom workflow properties, runtime inputs, and workflows that return results.

projects/elsa · high confidence

Add FileStreamResult example for streaming large files

A new MVC sample project demonstrates how to return a file to an HTTP request by streaming it, which is useful for serving large files to browsers. The example includes a controller action that reads a PDF file from the web root and returns it as a FileStreamResult, along with the sample PDF asset itself.

projects/mvc/result-filestream · high confidence

Add HTMX 4 'click once' trigger example

This location introduces a new sample application demonstrating the HTMX 4 \hx-trigger="click once"\ modifier. The sample includes a minimal ASP.NET Core web app that renders an HTML page with two list items: one using the \once\ modifier to trigger an HTMX request only on the first click, and another allowing unlimited clicks. It also adds VS Code workspace settings for consistent theming and a solution file to support building the project.

projects/htmx/trigger-once · high confidence

Add HTMX 4 sample demonstrating HX-Trigger with JSON payloads

This location introduces a new ASP.NET Core sample application that demonstrates how to use the HTMX 4 \HX-Trigger\ response header to emit multiple custom events with JSON payloads. The sample includes a web server that returns \HX-Trigger\ headers containing serialized JSON for \show-me\ and \show-you\ events on various HTTP methods (GET, POST, PUT, PATCH, DELETE), along with client-side JavaScript to listen for and alert these events. It also includes anti-forgery token handling configuration for HTMX requests.

projects/htmx/header-hx-trigger-4 · high confidence

Add HTMX HX-Replace-Url sample demonstrating URL history replacement

This location introduces a new ASP.NET Core sample application that demonstrates the HTMX \HX-Replace-Url\ response header. The sample includes a web server (\Program.cs\) that serves an HTML page with HTMX 4.0.0 (loaded via CDN) and handles GET, POST, PUT, PATCH, and DELETE requests to \/htmx\. For each non-GET request, the server appends an \HX-Replace-Url\ header to update the browser's URL bar to a specific path (e.g., \/get\, \/post\) without a full page reload. The sample also includes anti-forgery token handling for non-GET requests and a VS Code settings file for consistent editor theming.

projects/htmx/header-hx-replace-url · high confidence

Add HTMX polling sample using hx-trigger every

A new sample project demonstrates HTMX client-side polling using the \hx-trigger="every 1s"\ attribute. The example application serves an HTML page that includes HTMX v4.0.0 via CDN and periodically fetches the current UTC timestamp from a server endpoint, illustrating how to implement automatic content refresh without user interaction.

projects/htmx/trigger-every · high confidence

Add HTTP reason phrase demo application

A new ASP.NET Core application has been added to the web-utilities-reason-phrases project that demonstrates the ReasonPhrases utility. When run, the application responds with the standard HTTP reason phrases for status codes 200 and 500.

projects/web-utilities/web-utilities-reason-phrases · high confidence

Add HX-Refresh response header sample

The htmx header-hx-refresh sample now demonstrates how to use the HX-Refresh response header to instruct the browser to refresh the page. The sample application sends this header in response to GET, POST, PUT, PATCH, and DELETE requests, and includes client-side anti-forgery token handling for non-GET requests.

projects/htmx/header-hx-refresh · high confidence

Add HX-Reselect sample demonstrating response header-based content selection

A new sample application has been added to demonstrate the HX-Reselect response header feature in HTMX 4. This example shows how to use the HX-Reselect header to specify a CSS selector for the content to be swapped, overriding any hx-select attribute on the triggering element. The sample includes an ASP.NET Core backend that returns different content for GET, POST, PUT, PATCH, and DELETE requests, each with a corresponding HX-Reselect header pointing to a unique element ID in the response.

projects/htmx/header-hx-reselect · high confidence

Add HX-Retarget sample demonstrating response header-based DOM targeting

A new ASP.NET Core sample project demonstrates the HX-Retarget response header, allowing server-side logic to specify which client-side element should receive the response content. The example includes a web application that returns HX-Retarget headers for various HTTP verbs (GET, POST, PUT, PATCH, DELETE) to target specific list items, along with client-side configuration for anti-forgery tokens and a custom 'show-me' event listener.

projects/htmx/header-hx-retarget · high confidence

Add IHttpClientFactory usage examples for .NET 8

This location introduces a new set of four progressive code samples demonstrating how to use \IHttpClientFactory\ in ASP.NET Core applications. The examples cover basic factory usage, preconfigured named clients, injecting \HttpClient\ into concrete classes, and injecting it into interface-implementing classes. The samples are marked for .NET 8 and include necessary build scripts and VS Code configuration files to facilitate local development and debugging.

projects/httpclientfactory · high confidence

Add INI-based configuration sample with nested option support

A new sample application demonstrates loading configuration settings from an INI file using .NET's built-in configuration providers. The app binds nested INI sections and keys (such as app priorities and privacy keys) to a strongly-typed \IniOptions\ class and exposes the values via a web endpoint, illustrating how to structure and access hierarchical configuration data.

projects/configurations/configuration-ini-options · high confidence

Add IOptions configuration sample

A new sample project demonstrating how to bind configuration values to a strongly-typed options class using the IOptions interface in a minimal API. The sample registers MyOptions from the appsettings.json configuration section and exposes one of its properties via a GET endpoint.

projects/configurations/configuration-IOption · high confidence

Add Identity basic sample

This location introduces a new ASP.NET Core Identity sample application that demonstrates basic authentication functionalities, including user registration, sign-in, sign-out, and access to a restricted area. The sample uses Entity Framework Core with SQLite for data storage and implements standard Identity features such as email confirmation and password management.

projects/security/authentication-with-identity · high confidence

Add ImagerSharp image processing demo application

Introduces a new ASP.NET Core application in the projects/image-sharp directory that demonstrates image resizing capabilities using the SixLabors.ImageSharp.Web library. The application serves static files and provides a simple HTML interface to view an image resized by width or height via query parameters.

projects/image-sharp · high confidence

Add JSON DOM node filtering sample

A new sample project has been added to demonstrate parsing a JSON array into a writable DOM and filtering nodes using LINQ, specifically showing how to locate an object based on a string property and an array length.

projects/json/json-15 · high confidence

Add JSON date ticks format converter

The sample application now includes a custom JSON converter that serializes and deserializes DateTime values using the JavaScript date ticks format (e.g., /Date(1234567890)/). This allows the service to correctly handle legacy JSON date formats when reading or writing Person objects.

projects/json/json-11 · high confidence

Add JavaScript Interop sample page

A new Index page has been added to the Blazor Server JS Integration sample, demonstrating how to invoke JavaScript functions from C\#. The page calls console.log and alert on initial render, and uses a button to trigger a confirm dialog, displaying the user's response via an alert.

projects/blazor-ss/JsIntegration/Components/Pages · high confidence

Add MVC JsonResult example

A new sample project has been added to demonstrate how to return JSON content from an MVC action using the \JsonResult\ type. The example includes a \HomeController\ with a \JsonPersonResult\ endpoint that serializes a \Person\ object, along with an index page linking to that endpoint.

projects/mvc/result-json · high confidence

Add MVC and Razor Pages guestbook implementations

This location introduces two parallel implementations of a guestbook feature: an MVC version using controllers and views, and a Razor Pages version using page models. Users can now create, edit, and like guestbook entries via either the MVC or Razor Pages UI, with data persisted in an in-memory database.

projects/razor-pages/razor-pages-mvc · high confidence

Add MVC localization sample demonstrating culture fallback

This location introduces a new ASP.NET Core MVC sample that demonstrates culture fallback behavior. The application configures localization to support French (fr-FR), English (en), and US English (en-US), with French set as the default. It explicitly configures the Accept-Language header as the sole request culture provider. The sample includes resource files (Global.en-US.resx, Global.en.resx, Global.fr.resx) and a view that allows users to test how the system falls back from a specific culture (e.g., en-US) to a more general one (e.g., en) when a specific translation key is missing. An API controller exposes these localized strings via an endpoint that respects the Accept-Language header.

projects/mvc/localization/mvc-localization-9 · high confidence

Add MailKit email sending sample application

A new ASP.NET Core sample application has been added to the MailKit project that demonstrates how to send emails using the MailKit and MimeKit libraries. The app includes a web interface with a simple form to trigger email sending and a backend service that constructs a MIME message and transmits it via SMTP on port 587 with auto-SSL.

projects/mailkit/mailkit-1 · high confidence

Add NewsServer MVC demo application

Introduces a new ASP.NET Core MVC sample application that functions as an RSS reader. The app allows users to select from a configurable list of feeds (defaulting to various Microsoft developer blogs) and displays the feed items, including titles, authors, publish dates, and summaries, in a Bootstrap-styled interface.

projects/mvc/api-versioning, projects/syndications/newsserver-mvc · high confidence

Add OpenTelemetry baggage sample

A new sample project demonstrates how to configure OpenTelemetry tracing with baggage propagation. The application sets baggage items on the current activity and forwards them to downstream HTTP requests via the standard baggage header, illustrating how to pass user-defined properties across service boundaries.

projects/open-telemetry/open-telemetry-4 · high confidence

Add OpenTelemetry tracing sample project

A new sample project has been added that demonstrates basic OpenTelemetry tracing for ASP.NET Core applications. The sample configures tracing with console export and ASP.NET Core instrumentation, and includes a simple endpoint that returns the current trace ID, allowing users to see how traces are generated and exported to the console.

projects/open-telemetry/open-telemetry-1 · high confidence

Add Orleans 8.0 sample demonstrating HttpClient usage in a StatelessWorker grain

A new sample project has been added to demonstrate integrating HttpClient within an Orleans grain. The sample implements a StatelessWorker grain that fetches current time data from an external API and displays it via a web endpoint, illustrating how to use dependency injection and HTTP clients in this specific grain configuration.

projects/orleans/orleans-5 · high confidence

Add Orleans 8.0 sample with Redis persistence and grain timers

This location introduces a new sample application demonstrating Orleans 8.0 features, specifically the use of \Microsoft.Orleans.Persistence.Redis\ for grain state persistence and the \RegisterGrainTimer\ API for scheduled background tasks. The sample includes a web interface that displays greetings added by a timer every five seconds, requiring a local Redis instance to function.

projects/orleans/orleans-3 · high confidence

Add Orleans timer sample with Redis persistence

A new sample application demonstrating Orleans grain timers has been added to the projects/orleans/timer directory. The application uses a HelloTimerGrain to periodically append messages to a GreetingArchive, which is persisted in Redis. Users can interact with the sample by running the app and visiting localhost:5000 to view the timer-generated messages.

projects/orleans/timer · high confidence

Add Orleans-based RSS Reader sample with Redis persistence

A new RSS reader sample has been added to the Orleans samples. The application uses Orleans grains to fetch and store RSS/Atom feed items, leveraging Redis for persistent storage of feed sources and results. Users can run the sample locally (ensuring Redis is running) and view the aggregated feed items via a web interface at localhost:5000.

projects/orleans/rss-reader · high confidence

Add Orleans-based RSS reader sample with Redis storage

The rss-reader-4 sample introduces a new RSS reader application built on Orleans, featuring persistent feed source and result storage via Redis. It includes a web interface to view feed items and source health, and uses Orleans reminders to periodically fetch updates from OPML subscription lists.

projects/orleans/rss-reader-4 · high confidence

Add PDF.js viewer sample for ASP.NET Core

This location introduces a sample ASP.NET Core Razor Pages application that embeds the Mozilla PDF.js library. The \Program.cs\ file configures the web host to serve static files and map Razor pages, while \Index.cshtml\ provides the viewer UI, defaulting to a specific PDF document. The \wwwroot\ directory includes the necessary PDF.js JavaScript assets, localization files, and SVG icons required for the viewer's toolbar and annotation features.

projects/mini/pdf-viewer · high confidence

Add PathString sample demonstrating HttpContext.Request.Path behavior

A new sample application has been added to the path-string project to demonstrate how \HttpContext.Request.Path\ resolves various URL patterns, including double slashes and query parameters. The sample is a minimal ASP.NET Core web app that displays the resolved path for different request types, helping users understand the framework's path handling logic.

projects/path-string · high confidence

Add PhysicalFileResult demo for downloading files

A new MVC sample project has been added to demonstrate returning a physical file via the PhysicalFileResult. The application serves a sample PDF (Hegel's Philosophy of Mind) from the wwwroot directory, allowing users to download the file through a provided link on the home page.

projects/mvc/result-physicalfile · high confidence

Add QuickGrid static SSR sorting sample

Added a new sample application in the \projects/net11/quick-grid-ssr\ directory that demonstrates QuickGrid sorting and pagination working within statically rendered Blazor Server-Side Rendering (SSR) pages. The sample includes the necessary Razor components (\App.razor\, \Index.razor\, \MainLayout.razor\), program entry point, and imports to show how sortable headers and the paginator render as forms that update the URL query string, allowing users to sort, page, refresh, and share links without requiring an interactive circuit or WebAssembly runtime.

projects/net11/quick-grid-ssr · high confidence

Add RSS syndication output formatter sample

The projects/mvc/output-formatter-syndication location now includes a functional ASP.NET Core sample that demonstrates how to add RSS (application/rss+xml) output formatting. The new Program.cs registers a custom RssOutputFormatter, and the accompanying RssOutputFormatter.cs implements the logic to serialize SyndicationItem objects into RSS XML, allowing API endpoints to return RSS feeds instead of JSON or XML.

projects/mvc/output-formatter-syndication · high confidence

Add Razor Class Library sample with MVC controllers and views

This location introduces a sample demonstrating how to use a Razor Class Library with an MVC structure that includes controllers and views. It adds an \AboutController\ and \HomeController\ within the \MyFeature\ area, along with their corresponding Razor views (\Index.cshtml\), to provide specific page content. The sample application's \Program.cs\ is updated to register controllers using \AddControllersWithViews()\ and configures area-based routing via \MapControllerRoute\, allowing users to navigate to the library's feature pages (e.g., \/MyFeature\ and \/MyFeature/About\).

projects/mvc/razor-class-library/razor-class-library-with-controllers · high confidence

Add Razor Class Library sample with embedded static files

The sample application now demonstrates serving static assets (CSS, JavaScript, and images) embedded within Razor Class Libraries. It includes two libraries, RazorClassLibrary1 and RazorClassLibrary2, each providing a module page (Module1 and Module2) that renders content from embedded resources. The WebApplication host registers these libraries via ConfigureOptions to ensure their embedded wwwroot folders are correctly mapped and served alongside standard static files.

projects/mvc/razor-class-library/razor-class-library-with-static-files · high confidence

Add Razor Pages sample project structure and documentation

Introduces the Razor Pages sample project area with a README documenting ten sub-samples (Hello World, Basic, MVC comparison, Routing, Routing-2, HTML customization, TempData, and Handler Methods) and provides build scripts (build.bat and build.sh) to compile these specific sample directories.

projects/razor-pages · high confidence

Add Razor class library sample with integrated web host

This change introduces a new sample demonstrating Razor class libraries (RazorClassLibrary1 and RazorClassLibrary2) containing Area-based pages (Module1 and Module2). It includes a WebApplication host that registers Razor Pages and provides a landing page with links to the library pages at /module1 and /module2, illustrating how to consume Razor class libraries in an ASP.NET Core application.

projects/mvc/razor-class-library/razor-class-library-1 · high confidence

Add RazorSlices Hello World sample

A new 'Hello World' sample has been added to the RazorSlices project, demonstrating how to use the Razor-based template engine in minimal APIs without requiring MVC, Razor Pages, or Blazor. The sample includes a minimal API entry point that returns a source-generated, strongly-typed slice, along with the necessary Razor view and configuration files to render a simple greeting.

projects/razor-slices · high confidence

Add Remaining Time visualization tool

A new standalone web application has been added to the SFA project that allows users to visualize the remaining weeks in a project. The tool provides a simple interface where users can input the current progress and the total project duration, then render a doughnut chart (using Chart.js) to display the split between time spent and time remaining.

projects/sfa/remaining-time · high confidence

Add RenderTreeBuilder sample demonstrating programmatic Blazor components and prerendering

A new sample project has been added to demonstrate implementing Blazor components programmatically using the RenderTreeBuilder API instead of Razor syntax. The sample includes a ListNames component that builds its render tree manually and a Separator component, illustrating how to create elements and nest components via code. It also showcases how to use the IComponentPrerenderer service within a minimal API endpoint to prerender these components with the InteractiveServer render mode, ensuring the HTML content is correctly written within the renderer's dispatcher.

projects/blazor-ss/RenderTreeBuilder · high confidence

Add Route Debugger middleware for ASP.NET Core

Introduces a new RouteDebugger middleware that injects an 'X-ASPNETCORE-ROUTE' header into HTTP responses, displaying endpoint details such as route pattern, name, HTTP methods, and matched route data. This tool aids in debugging routing configurations by providing immediate visibility into how requests are matched within the application pipeline.

projects/route-debugger-web · high confidence

Add Server-Sent Events (SSE) sample for HTMX 4

A new sample application has been added to demonstrate the HTMX 4 SSE extension. The sample includes a minimal web server that streams HTML list items to the client using Server-Sent Events and a corresponding HTML page that uses the \hx-sse:connect\ attribute to receive and append these events to the DOM, concluding with a named 'done' event to close the stream.

projects/htmx/hx-sse · high confidence

Add SignalR chat client and server sample

Introduces a new SignalR chat demonstration within the signalr-1 sample project. The client application (running on port 5002) serves a web interface that connects to a server hub at https://localhost:5001/chathub, allowing users to send and receive real-time messages. The server application (running on port 5001) exposes a ChatHub that broadcasts incoming messages to all connected clients and is configured with CORS to permit requests from the client's origin.

projects/signalr/signalr-1/Client · high confidence

Add TempData sample for Razor Pages

A new sample application has been added to the \projects/razor-pages/temp-data\ directory to demonstrate how to use \TempData\ in Razor Pages. The sample includes a home page that displays a message using \TempData.Peek\ to retain the value, and a separate page that sets the \TempData\ value using the \\[TempData\]\ attribute on a page model property. This allows users to see how temporary data is passed between pages and how to access it without immediate consumption.

projects/razor-pages/temp-data · high confidence

Add URI helper sample demonstrating GetEncodedUrl

A new sample application has been added to the uri-helper location that demonstrates the ASP.NET Core \GetEncodedUrl\ extension method. The app serves a web page displaying the fully escaped request URL and provides clickable links to show how various query parameters and paths are encoded.

projects/uri-helper/uri-helper-get-encoded-url · high confidence

Add Unpoly up-poll example

Added a new example project demonstrating Unpoly's up-poll feature, which allows clients to poll a server endpoint at specific intervals. The example includes a .NET WebApplication that serves an HTML page referencing Unpoly 3.8.0 via CDN and implements a /unpoly endpoint that returns updated content with a timestamp, illustrating how to use the up-poll attribute with up-source and up-interval parameters.

projects/unpoly/up-poll · high confidence

Add Unpoly up-target fragment loading example

A new demo application has been added that demonstrates how to use the Unpoly \up-target\ attribute to load content fragments via AJAX. The example showcases tag, ID, and class selectors for targeting specific DOM elements, and includes a C\# helper to detect Unpoly requests via the \X-Up-Version\ header.

projects/unpoly/up-target · high confidence

Add UriHelper.BuildAbsolute sample demonstrating URI component combination

A new sample project has been added to demonstrate the \UriHelper.BuildAbsolute\ method from \Microsoft.AspNetCore.Http.Extensions\. The sample application runs a web server that displays nine different usage examples, showing how to combine scheme, host, path base, path, query string, and fragment components into properly encoded absolute URIs for use in HTTP headers.

projects/uri-helper/uri-helper-build-absolute · high confidence

Add Wall of Counters Blazor Server sample

A new Blazor Server sample application has been added to demonstrate using System.Timers.Timers to update the UI from background threads. The sample features a grid of nine counters that increment at different intervals, implemented with a Razor component and scoped CSS isolation. The project is configured as a standalone Blazor Server app using .NET 6 APIs (WebApplication.CreateBuilder) and includes a README explaining the threading pattern.

projects/blazor-ss/WallOfCounters · high confidence

Add Web Sockets samples and build scripts

This change introduces a new set of Web Sockets sample projects (web-sockets-1 through web-sockets-6) located in the projects/web-sockets directory, along with corresponding build scripts (build.bat and build.sh) and a README.md file. The samples demonstrate various Web Sockets implementations, including basic echo servers, handling large buffers, broadcast functionality, connection closing events, MVC controller integration, and a rudimentary chat server. The build scripts allow users to build all sample projects.

projects/file-provider, projects/web-sockets · high confidence

Add WebSocket echo example via MVC controller

A new example project has been added that demonstrates handling WebSocket connections using an ASP.NET Core MVC controller. The application serves an HTML page with a simple chat interface and implements a WebSocket endpoint at /ws that echoes received text messages back to the client, allowing users to test real-time bidirectional communication by opening the page in multiple tabs.

projects/web-sockets/web-sockets-6 · high confidence

Add WebSocket echo sample application

A new sample application has been added to the web-sockets-1 project that demonstrates a basic WebSocket echo server. The application accepts WebSocket connections, echoes back any text messages received from the client, and serves an HTML page with a simple interface for sending messages. This provides a reference implementation for integrating WebSocket functionality into .NET applications.

projects/web-sockets/web-sockets-1 · high confidence

Add WebSocket echo sample with embedded HTML client

A new sample application has been added to the web-sockets-2 project that demonstrates a basic WebSocket echo server. The application accepts WebSocket connections, reads incoming text messages, and sends them back prefixed with 'Echo'. It also serves an embedded HTML page containing a simple client interface (using jQuery) that allows users to connect to the server at ws://localhost:5000 and send/receive messages via a text input and button.

projects/web-sockets/web-sockets-2 · high confidence

Add background service example with timer-based updates

A new sample project demonstrates implementing a background task using the IHostedService interface and a Timer. The application registers a GreeterUpdaterService that increments a counter every second in the background, allowing users to see the greeting update dynamically upon page reload.

projects/ihosted-service/ihosted-service-2 · high confidence

Add basic device detection sample application

A new minimal ASP.NET Core application has been added to the device-detection project to demonstrate client device detection. The app uses the Wangkanai.Detection library to identify whether a request comes from a desktop or mobile client and returns the user agent and device type in the HTTP response. The project includes a solution file, a README noting .NET 8 compatibility, and VS Code settings for development.

projects/device-detection · high confidence

Add caching examples with absolute expiration and post-eviction logging

The caching-3 project now demonstrates memory caching with a 5-second absolute expiration and a post-eviction callback that logs removal events to the console, providing a more interactive example than the previous 100-minute expiration sample in caching-1.

projects/caching/caching-3 · high confidence

Add configuration samples for IOptions array binding and environment variables

New sample projects have been added to demonstrate binding array values from appsettings.json using the IOptions interface (configuration-IOption-array) and loading/displaying environment variables (configuration-environment-variables). The README has been updated to include links to these new samples, and build scripts (build.bat, build.sh) now include targets for the new configurations.

projects/configurations · high confidence

Add connection details endpoint to features-connection service

The features-connection service now includes a new Program.cs entry point that exposes local and remote IP addresses, ports, and the connection ID to users via the HTTP response.

projects/features/features-connection · high confidence

A new sample application has been added to demonstrate setting and reading cookies in a minimal API. The app creates a cookie named 'MyCookie' with the value 'Hello World' if it is not already present, and displays the cookie's value on the response page.

projects/request/cookies-1 · high confidence

Add diagnostics-4 sample with custom global error handling

The diagnostics-4 project now includes a Program.cs file that demonstrates ASP.NET Core minimal hosting with a custom global error handler. When an exception occurs (simulated by throwing an ApplicationException), the application catches it and returns a 500 status code with an HTML page displaying the encoded error message and source, rather than the default developer exception page.

projects/diagnostics/diagnostics-4 · high confidence

Add documentation and build scripts for ASP.NET Core Features samples

This change introduces a new README file documenting 11 ASP.NET Core feature samples, including Server Addresses, Request, Connection, Custom Features, Request Culture, Session (with and without Redis), Maximum Request Body Size, and IHttpResponseBodyFeature. It also adds build.bat and build.sh scripts to facilitate building these sample projects.

projects/features · high confidence

Add endpoint interrogation sample for .NET 6

A new sample application demonstrates how to use \route.DataSources\ to inspect available endpoints in an ASP.NET Core app. The project includes a root endpoint that lists route patterns, display names, and metadata for all registered endpoints, alongside standard MVC and Razor Pages routes.

projects/endpoint-routing/new-routing-6 · high confidence

Add endpoint routing sample with HTTP verb filtering

A new sample project demonstrating endpoint routing using the minimal hosting model in .NET 6. The application uses \MapMethods\ to handle specific HTTP verbs (GET and POST) for different routes, including a form submission flow that restricts access to the 'about' endpoint to POST requests only.

projects/endpoint-routing/new-routing-7 · high confidence

Add endpoint-routing sample demonstrating Razor Page fallback

This location introduces a new sample application that demonstrates how to use \MapFallbackToPage\ to serve a Razor Page when no other endpoint matches the request. The sample includes the necessary project files, a \Program.cs\ using the minimal hosting model, and a \Pages/index.cshtml\ view, along with VS Code configuration files for building and debugging.

projects/endpoint-routing/new-routing-9 · high confidence

Add example demonstrating array manipulation in System.Text.Json

A new sample project has been added to the json-22 location that demonstrates how to use the writable DOM (JsonNode) to modify JSON arrays. The example shows how to parse a JSON array, insert new items at both the beginning and the end of the array, and output the updated document.

projects/json/json-22 · high confidence

Add example for IHttpResponseBodyFeature

A new feature example demonstrating the use of the IHttpResponseBodyFeature interface has been added. This example shows how to write directly to the HTTP response body stream using the consolidated feature, replacing older patterns involving IHttpResponseFeature.Body, IHttpSendFileFeature.SendFileAsync, and IHttpBufferingFeature.DisableResponseBuffering.

projects/features/features-http-body-response · high confidence

Add example for logging static file servings with custom physical file provider

This location introduces a new .NET 6 sample application that demonstrates how to log information about static files being served using the \OnPrepareResponse\ callback in \StaticFileOptions\. The example also shows how to serve static files from a custom directory (\wwwroot2\) mapped to a specific request path (\/2\), alongside the default \wwwroot\ folder.

projects/file-provider/serve-static-files-8 · high confidence

Add gRPC sample demonstrating oneof type usage

A new gRPC sample project has been added to demonstrate how to use the \oneof\ type in Protocol Buffers to simulate nullable value types. The sample includes a client and server implementation where the \MessageRequest\ message uses \oneof\ fields for \wage\ and \bonus\, allowing the server to distinguish between unset and zero-value properties.

projects/grpc/grpc-8 · high confidence

Add gRPC sample for sending enum, string, and datetime values

A new gRPC sample project has been added to demonstrate how to define Protocol Buffers to support sending enum, string, and datetime types. The sample includes a client and server implementation, featuring a \Billboard\ service with a \ShowMessage\ RPC that accepts a \MessageRequest\ containing a sender, message content, and a \MessageType\ enum (SMS, TWEET, LONG\_FORM), and returns a \MessageReply\ with the processed message and a timestamp.

projects/grpc/grpc-5 · high confidence

Add gRPC sample projects for unary and server streaming RPCs

New sample projects have been added to demonstrate gRPC communication patterns. The \projects/grpc/grpc\ location contains a 'Hello World' example implementing a simple unary RPC, while \projects/grpc/grpc-2\ introduces a server streaming example where the server sends repeated messages to the client. Both samples include the necessary C\# server and client implementations, Protocol Buffer definitions, and documentation.

projects/grpc/grpc, projects/grpc/grpc-2 · high confidence

Add gRPC server streaming sample for image delivery

A new gRPC sample project has been added to demonstrate server-streaming capabilities by streaming an image file (kitty.jpg) from a server to a client. The implementation includes a .proto definition for the \Billboard\ service, a server-side gRPC service that reads the image in chunks and streams them, and a client application that consumes the stream, saves the file, and displays it in a web page.

projects/grpc/grpc-9 · high confidence

Add gRPC-Web Hello World sample

Introduces a new sample demonstrating a simple Unary RPC using gRPC-Web. The sample includes a server project that exposes a gRPC service over HTTP/2 with gRPC-Web enabled, and a client project that connects to the server using the GrpcWebHandler to send a message and display the response.

projects/grpc/grpc-10 · high confidence

Add gRPC-Web server streaming sample

A new sample demonstrating gRPC-Web server streaming has been added to the gRPC-11 project. It includes a server that repeats a message ten times at five-second intervals over HTTP/1.1 and a client that consumes this stream, allowing users to see how gRPC-Web handles streaming responses in a browser-compatible context.

projects/grpc/grpc-11 · high confidence

Add gRPC-Web server streaming sample with Blazor WebAssembly client

This location introduces a new sample demonstrating gRPC-Web server streaming. The server (running on .NET 6) exposes a 'Billboard' service that streams messages every 5 seconds over HTTP/2, configured with CORS to allow cross-origin requests. The client is a Blazor WebAssembly application that uses the GrpcWebHandler to connect to the server, allowing users to click a button to start receiving and displaying the streamed messages in the browser.

projects/grpc/grpc-12 · high confidence

Add generic-host configure-app sample

A new sample application has been added to the generic-host project that demonstrates configuring an IHost with in-memory configuration, console logging, and a hosted service. The application initializes a HostBuilder to inject key-value pairs into the configuration, registers a HelloWorldService, and configures logging to output to the console while filtering out Microsoft framework logs.

(repo-wide) · high confidence

Add generic-host sample demonstrating IHostApplicationLifetime

A new sample project has been added to the generic-host directory that demonstrates how to use the IHostApplicationLifetime service. The sample configures a hosted service to register callbacks for the ApplicationStarted, ApplicationStopping, and ApplicationStopped lifecycle events, providing a concrete example of handling application startup and shutdown signals.

projects/generic-host/generic-host-ihostapplicationlifetime · high confidence

Add generic-host-1 sample with hosted service and console logging

A new sample project (generic-host-1) has been added that demonstrates a .NET Generic Host running a background IHostedService. The service logs debug messages on start and stop, and the host is configured to output logs to the console while filtering out Microsoft framework categories.

projects/generic-host/generic-host-1 · high confidence

Add generic-host-5 sample with hosted service and VS Code configuration

A new sample project (generic-host-5) is introduced, demonstrating a .NET Generic Host that runs a background counting service using IHostedService. The sample includes VS Code launch and task configurations to support building and debugging the application, along with logging setup that filters out Microsoft framework logs.

projects/generic-host/generic-host-5 · high confidence

Add generic-host-environment sample application

A new sample application has been added at projects/generic-host/generic-host-environment that demonstrates how to configure a .NET generic host with environment-specific logging. The application runs a hosted service that logs different messages depending on whether the environment is Development, Staging, or Production, and configures the logging provider to filter out Microsoft framework logs while outputting to the console.

(repo-wide) · high confidence

Add htmx history configuration sample

A new sample application demonstrates how to configure htmx's history behavior, specifically showing how back/forward navigation re-fetches pages and swaps content into the body or an \[hx-history-elt\] element. The sample includes a simple multi-page navigation and instructions for adjusting the htmx.config.history setting to control whether history is cached, reloaded, or disabled.

projects/htmx/history-config · high confidence

Add hx-boost sample using HTMX 4 and Pico CSS

A new sample project demonstrating the hx-boost attribute has been added to the htmx/boost location. The sample application uses HTMX version 4.0.0 and the Pico CSS framework, replacing previous implementations that relied on a local NuGet dependency. It illustrates how hx-boost enables links and forms to issue AJAX requests and target the response to the body tag.

projects/htmx/boost, projects/htmx/target · high confidence

Add hx-config sample demonstrating per-element request configuration

A new sample project demonstrates the hx-config attribute, which allows users to apply fetch and request settings (such as timeout and mode) on a per-element basis using either JSON or htmx's key:value syntax. This sample illustrates the replacement for the previously removed hx-request attribute, providing a concrete example of how to configure individual element requests within an htmx application.

projects/htmx/hx-config · high confidence

Add hx-confirm inheritance example with HTMX 4 and antiforgery

This location introduces a new sample demonstrating how to use the \hx-confirm\ attribute with inheritance (via \hx-confirm:inherited\) to prompt users before performing HTTP requests. The example is updated to use HTMX version 4 and includes server-side antiforgery token validation for non-GET requests, ensuring secure handling of POST, PUT, PATCH, and DELETE actions.

projects/htmx/hx-confirm · high confidence

Add hx-download sample demonstrating file downloads

A new sample project for the hx-download extension has been added, illustrating how to use the \hx-swap="download"\ attribute to trigger native browser file downloads via htmx. The sample includes a minimal ASP.NET Core application that serves an HTML page with a download button and a \/report\ endpoint that returns a text file, along with documentation explaining that the extension handles the fetch-based download and Content-Disposition header for filename specification.

projects/htmx/hx-download · high confidence

Add hx-head sample demonstrating head content merging

A new sample application has been added to the hx-head project that demonstrates how to use the hx-head extension to merge response head elements (such as titles and styles) into the current document after a body swap. The sample includes a Program.cs file showing a minimal ASP.NET Core web app and a README explaining the hx-head='merge' behavior.

projects/htmx/hx-head · high confidence

Add hx-headers sample demonstrating HTTP header passing and anti-forgery with HTMX 4

This location introduces a new ASP.NET Core sample that demonstrates using the \hx-headers\ attribute to inject custom HTTP headers (specifically \X-NAME\) into HTMX requests, alongside a client-side script that automatically attaches anti-forgery tokens to non-GET requests. The sample is built on HTMX 4.0.0 (loaded via CDN) and includes the necessary server-side antiforgery validation logic.

projects/htmx/hx-headers · high confidence

Add hx-include sample demonstrating parameter passing across HTTP verbs

This location introduces a new sample application that demonstrates using the \hx-include\ attribute to pass form input parameters to all supported HTTP verbs (GET, POST, PUT, PATCH, DELETE). The sample includes a frontend using HTMX 4 and a backend that validates antiforgery tokens for non-GET requests, providing a concrete example of how to handle parameters via \Request.Query\ for GET/DELETE and \Request.Form\ for other verbs.

projects/htmx/hx-include · high confidence

Add hx-indicator sample demonstrating custom spinner with HTMX 4

This location introduces a new sample application that demonstrates the \hx-indicator\ attribute in HTMX 4. The sample provides a custom CSS spinner (replacing HTMX 4's default indicator stylesheet) and includes a .NET backend that serves the UI and handles AJAX requests. It also implements manual anti-forgery token handling for non-GET requests via JavaScript and server-side validation, ensuring secure interaction while displaying the loading state.

projects/htmx/hx-indicator · high confidence

Add hx-live sample demonstrating reactive DOM scripting

A new sample application has been added to showcase the hx-live extension, which enables DOM-based reactive scripting, data state management, and :text bindings without requiring a separate framework. The sample includes a web page with interactive elements like a counter with Add/Deduct buttons, a progress bar that updates based on shared state, and a debounced text input, illustrating how hx-live handles real-time UI updates.

projects/htmx/hx-live · high confidence

Add hx-on event handling sample

Added a new sample project demonstrating how to use the \hx-on\ attribute to handle HTML events (such as click, mouseover, and dblclick) via inline JavaScript. The sample is built with ASP.NET Core, uses HTMX version 4.0.0, and applies Pico CSS for styling.

projects/htmx/hx-on · high confidence

Add hx-preserve sample demonstrating element preservation across HTTP methods

A new sample project demonstrates the \hx-preserve\ attribute, showing how to keep specific DOM elements unchanged during HTMX swaps for GET, POST, PUT, PATCH, and DELETE requests. The sample includes a .NET 8 web application that serves an HTML page with links triggering these HTTP methods, utilizing HTMX v4.0.0 via CDN and implementing anti-forgery token handling for non-GET requests to ensure secure interactions.

projects/htmx/hx-preserve · high confidence

Add hx-prompt example demonstrating HTMX 4 inheritance and anti-forgery

A new sample application has been added to demonstrate the \hx-prompt\ extension in HTMX 4. The example showcases attribute inheritance by applying \hx-prompt\ to a parent \\<ul\>\ element, which propagates the prompt requirement to child list items for various HTTP verbs (GET, POST, PUT, PATCH, DELETE). It also includes a .NET backend that reads the \HX-Prompt\ header in the response handlers and implements automatic anti-forgery token injection for non-GET requests using HTMX's configuration API.

projects/htmx/hx-prompt · high confidence

Add hx-query sample demonstrating HTTP QUERY method

A new sample project has been added to demonstrate the hx-query attribute, which sends included form values in the request body using the HTTP QUERY method. The sample includes a web page with a search input and button that triggers a QUERY request to a /search endpoint, which echoes the request body content back to the user.

projects/htmx/hx-query · high confidence

Add hx-replace-url sample demonstrating URL replacement with HTMX 4

A new sample project demonstrates the \hx-replace-url\ attribute in HTMX 4, showing how to update the browser's address bar without adding history entries. The sample includes a side-by-side comparison of standard navigation versus URL replacement for GET, POST, PUT, PATCH, and DELETE requests, and implements anti-forgery token handling for non-GET requests.

projects/htmx/hx-replace-url · high confidence

Add hx-select demonstration sample

A new sample project has been added to demonstrate the \hx-select\ attribute, showing how to extract specific elements from server responses. The sample includes a web application that serves an HTML page with two lists: one replacing the entire content and another using \hx-select:inherited="\#result"\ to target a specific div. It also implements anti-forgery token handling for non-GET requests and references htmx version 4.0.0 via CDN.

projects/htmx/select · high confidence

Add hx-status sample demonstrating per-response-status behavior

A new sample application in projects/htmx/hx-status demonstrates how to use the hx-status attribute to customize swap behavior based on HTTP response codes. The sample shows how to handle specific status codes like 422 and general ranges like 5xx, allowing users to see how different response statuses can trigger distinct UI updates.

projects/htmx/hx-status · high confidence

Add hx-sync queue demonstration sample

A new sample application has been added to demonstrate the HTMX \hx-sync\ attribute with queue behaviors (\first\, \last\, and \all\). The project includes a web interface showcasing GET, POST, PUT, PATCH, and DELETE operations, along with a backend that validates anti-forgery tokens for non-GET requests. This serves as a reference implementation for synchronizing rapid user interactions.

projects/htmx/hx-sync-queue · high confidence

Add hx-targets extension demo for multi-element updates

A new demo project in projects/htmx/hx-targets illustrates the hx-targets extension, allowing a single HTMX request to swap content into multiple elements matching a CSS selector simultaneously. The example application demonstrates this by using the hx-targets attribute on a button to update all elements with the .alert-box class.

projects/htmx/hx-targets · high confidence

Add logging-4 sample demonstrating LoggerMessage attribute

A new sample project (logging-4) has been added to demonstrate the use of the \[LoggerMessage\] attribute for source-generated, high-performance logging in .NET. The sample includes a minimal ASP.NET Core application that filters logs and uses generated extension methods to log even/odd input numbers, along with VS Code color customization settings and a README explaining the feature.

projects/logging/logging-4 · high confidence

Add out-of-band swap example using HTMX 4

A new sample project demonstrates the HTMX \hx-swap-oob\ attribute for out-of-band DOM updates. The example uses HTMX version 4 (loaded via CDN) and shows how a server response can include an element with \hx-swap-oob="true"\ to update a target outside the immediate swap area, alongside a standard innerHTML swap.

projects/htmx/swap-2 · high confidence

Add output cache middleware samples

Added eight sample applications demonstrating various output caching configurations, including basic caching, varying by query string, tag-based eviction, global base policies, and custom policy expiration.

projects/output-cache-middleware · high confidence

Add parameter transformer demo for kebab-case routing

A new demo application has been added to the endpoint-routing samples that demonstrates how to use a custom \IOutboundParameterTransformer\ to convert PascalCase controller and action names into kebab-case URLs (e.g., \AboutUs\ becomes \/home/about-us\). The sample configures MVC conventions to apply this transformation automatically to route tokens, while preserving explicit route attributes that do not use tokens.

projects/endpoint-routing/parameter-transformer · high confidence

Add physical file provider demonstration application

A new demo application has been added to the file-provider-physical project that displays the root paths and directory contents for both the content root and web root. The application iterates through the files in these directories and renders them as an HTML list, allowing users to visually verify how the PhysicalFileProvider exposes the underlying file system structure.

projects/file-provider/file-provider-physical · high confidence

Add rate limiter demo page with concurrency tracking

The rate limiter HTTP client demo now includes an Index page that demonstrates concurrent HTTP requests using Polly's rate limiting. The page sends 1000 requests in batches of 20 to a dummy JSON API, tracking the status of each request in a dictionary. It specifically handles RateLimiterRejectedException to log failures when the rate limiter rejects requests, providing users with a practical example of how to observe and handle rate limiting behavior in a web application.

projects/polly/rate-limiter-http-client/Pages · high confidence

Add request-timeouts-middleware sample project

Added a new sample project demonstrating the ASP.NET Core request timeout middleware. The sample includes six sub-projects illustrating how to configure timeouts in Minimal APIs and MVC controllers, covering default policies, named policies, and the use of the RequestTimeout attribute.

projects/request-timeouts-middleware · high confidence

Add routing sample demonstrating Orchard Core module integration

A new sample application in the routing area demonstrates how to integrate Orchard Core modules into a standard ASP.NET Core host. It includes a host application that bootstraps Orchard Core with MVC support and two sample modules, ForumModule and TicketModule, each defining their own controllers, views, and area-based routes via Startup classes. The sample also provides a Routes page to inspect the resulting routing table and a README explaining the module structure and routing customization.

projects/orchard-core/routing · high confidence

Add sample .NET 6 MVC API project

A new sample project has been added to the repository under projects/mvc/api, providing a minimal .NET 6 MVC API. The project includes a Program.cs file that sets up a web application with controllers and exposes a single endpoint at /api/anendpoint, which returns a static string. A README.md file is also included to document the project and provide instructions for running it locally.

projects/mvc/api · high confidence

Add sample application demonstrating convention-based routing in .NET 6

This location introduces a new sample application that demonstrates convention-based routing using the minimal hosting model in .NET 6. The project includes controllers for Home and Admin pages, configured with specific routes for /Admin and /About alongside a default route pattern, and provides the necessary VS Code launch and task configurations to build and debug the application.

projects/endpoint-routing/new-routing-20 · high confidence

Add sample demonstrating HX-Trigger response header

A new sample project has been added to demonstrate the usage of the \HX-Trigger\ response header in htmx. The application serves an HTML page with links for various HTTP methods (GET, POST, PUT, PATCH, DELETE) and configures the server to return an \HX-Trigger: show-me\ header in the response, which causes the client-side htmx library to dispatch a custom \show-me\ event that triggers an alert.

projects/htmx/header-hx-trigger · high confidence

Add sample demonstrating JSON node filtering with LINQ

A new sample project has been added to the JSON samples directory that demonstrates how to parse a JSON array into a writable DOM and use LINQ to find nodes based on the absence of a specific property. The application parses a JSON string containing user objects, identifies the entry lacking a 'favoriteNumbers' field, and outputs both the node's content and its path.

projects/json/json-16 · high confidence

Add sample demonstrating JSON node path retrieval and LINQ filtering

A new sample project has been added to the json-17 location that demonstrates using System.Text.Json.Nodes to parse a JSON array, retrieve the path of nodes, and filter for specific values using LINQ. The application runs a minimal web server that outputs the parsed JSON structure and the path of a matched node.

projects/json/json-17 · high confidence

Add sample demonstrating JSON node search with LINQ

A new sample project has been added to the JSON samples directory that demonstrates how to parse a JSON array into a writable DOM and locate specific nodes using LINQ queries. The example shows how to filter objects by property value (e.g., finding a person by age) and retrieve their JSON path.

projects/json/json-14 · high confidence

Add sample demonstrating JSON serialization attributes

A new sample project has been added to demonstrate how to control JSON serialization behavior using attributes. It shows how to use \\[JsonPropertyName\]\ to explicitly set property names in the output JSON (bypassing naming policies) and \\[JsonIgnore\]\ to exclude specific properties from serialization entirely.

projects/json/json-4 · high confidence

Add sample demonstrating JsonObject construction

A new sample project has been added to demonstrate constructing JSON documents using the \JsonObject\ and \JsonArray\ classes from \System.Text.Json.Nodes\. The example illustrates both verbose construction using \JsonValue.Create\ and a more terse approach leveraging implicit operators, showing users how to build and serialize JSON structures programmatically.

projects/json/json-18 · high confidence

Add sample demonstrating JsonObject usage

A new sample project has been added to the json-13 location that demonstrates parsing JSON strings and accessing data using the \JsonObject\ type from \System.Text.Json.Nodes\. The sample application parses a JSON object containing person details and iterates through its elements to display key-value pairs.

projects/json/json-13 · high confidence

Add sample demonstrating MVC-only endpoint routing

A new sample project has been added to demonstrate how to configure an ASP.NET Core application to use only MVC routes (specifically attribute routing) via \app.UseRouting\, explicitly noting that Razor Pages are not supported in this configuration.

projects/endpoint-routing/new-routing-2 · high confidence

Add sample demonstrating OpenTelemetry attribute recording

A new sample project (open-telemetry-3) has been added that demonstrates how to record custom attributes into the current OpenTelemetry span. The sample configures ASP.NET Core instrumentation with a console exporter and sets custom tags (such as 'project' and 'location') on the active activity during request handling, allowing users to see how custom data is attached to traces.

projects/open-telemetry/open-telemetry-3 · high confidence

Add sample demonstrating Razor Pages Area routing via conventions

This location introduces a sample application that demonstrates how to map specific routes to Razor Pages located within Areas using the \AddAreaPageRoute\ convention. The sample includes the necessary project structure, such as \Areas/Admin\ and \Areas/Customer\ with their respective index pages, and a \Program.cs\ that configures the routing for \/Manage\ and \/CustomerService\. It also provides VS Code launch and task configurations to facilitate local development and debugging of this specific routing pattern.

projects/endpoint-routing/new-routing-27 · high confidence

Add sample demonstrating Razor Pages Areas

This location introduces a sample application that demonstrates how to configure and use Razor Pages Areas. It includes the necessary project structure with \Areas/Admin\ and \Areas/Customer\ folders containing specific pages (Index, Manage, Reports, Tickets), a main index page linking to these areas, and a minimal Program.cs setup using the generic host builder to map Razor Pages. The sample also provides VS Code launch and task configurations to facilitate local development and debugging of the area-based routing.

projects/endpoint-routing/new-routing-28 · high confidence

Add sample demonstrating Razor Pages area fallback routing

This location introduces a new sample application that demonstrates how to configure a fallback page within a Razor Pages area. The sample includes the necessary page views for Admin and Customer areas, along with a Program.cs setup that registers Razor Pages and maps a fallback route to the 'Other' page in the Admin area, allowing unmatched non-file routes to resolve to a specific area-based view.

projects/endpoint-routing/new-routing-29 · high confidence

Add sample demonstrating Razor Pages area fallbacks with route patterns

This location introduces a new sample application that demonstrates how to configure fallback pages within Razor Pages areas based on specific route patterns. The sample includes an Admin area with pages for managing, reporting, and handling fallbacks for various URL structures (such as numeric segments or deep-level patterns), alongside a Customer area. It utilizes the new \MapFallbackToAreaPage\ API to route unmatched requests to specific pages within these areas, providing a concrete example of this routing capability.

projects/endpoint-routing/new-routing-30 · high confidence

Add sample demonstrating Razor Pages routing with Orchard Core modules

This location introduces a sample application that demonstrates how to integrate Razor Pages with the Orchard Core Framework module system. It includes a host application configured with ASP.NET Core MVC and two sample modules, ForumModule and TicketModule, which define custom routes using the \@page\ attribute. The sample illustrates how OCF creates areas based on module names and how these module-level Razor Pages interact with the host application's routing.

projects/orchard-core/routing-2 · high confidence

Add sample demonstrating Razor Pages with MVC API support

A new sample project has been added to demonstrate how to enable Razor Pages alongside MVC API controllers using the minimal hosting model. The sample includes a Program.cs that registers Razor Pages and maps controllers, an Index.cshtml page that links to a GET API endpoint, and a controller returning a JSON message, illustrating the coexistence of Razor Pages and MVC API without full MVC Views support.

projects/endpoint-routing/new-routing-19 · high confidence

Add sample demonstrating UriHelper.GetEncodedPathAndQuery

A new sample application has been added to demonstrate the \UriHelper.GetEncodedPathAndQuery\ method. The app serves an HTML page that displays the encoded relative URL of the current request and provides clickable links to various paths and query strings (including special characters and fragments) to illustrate how the helper method encodes them.

projects/uri-helper/uri-helper-get-encoded-path-and-query · high confidence

Add sample demonstrating area-based routing with MapAreaControllerRoute

This location introduces a new ASP.NET Core sample application that demonstrates how to configure routing for application areas using the \MapAreaControllerRoute\ extension method. The project includes controllers and views for 'Admin' and 'Customer' areas, along with a main home page linking to them, and is configured to target .NET Core 3.1.

projects/endpoint-routing/new-routing-16 · high confidence

Add sample demonstrating classic MVC configuration with Views

A new sample project has been added to demonstrate configuring ASP.NET Core MVC with Views support while excluding Razor Pages. The sample uses the \AddControllersWithViews\ service method and includes a basic controller and view to illustrate this specific setup.

projects/endpoint-routing/new-routing-18 · high confidence

Add sample demonstrating custom TimeSpan converter in System.Text.Json

The json-9 project now includes a sample application that demonstrates how to implement a custom JsonConverter for the TimeSpan type using System.Text.Json. The sample shows how to configure JsonSerializerOptions to use this converter, enabling TimeSpan properties to be serialized and deserialized as strings within JSON payloads.

projects/json/json-9 · high confidence

Add sample demonstrating endpoint authorization and anonymous access

A new sample project has been added to demonstrate how to configure endpoint-level authorization in ASP.NET Core. The sample shows how to use the \.AllowAnonymous()\ and \.RequireAuthorization()\ extension methods to control access to specific routes, including a public home page, a login path, and a protected area that requires authentication via cookie authentication.

projects/endpoint-routing/new-routing-31 · high confidence

Add sample demonstrating endpoint feature access

A new sample project has been added to demonstrate how to retrieve endpoint information within middleware or handlers using the \IEndpointFeature\ interface from \HttpContext.Features\. The sample includes a minimal ASP.NET Core application that exposes the endpoint's display name at the root path, along with the necessary VS Code launch and task configurations to run it.

projects/endpoint-routing/new-routing-14 · high confidence

Add sample demonstrating host-based endpoint routing

A new sample project has been added to demonstrate host matching in endpoint routing. The application listens on two local ports (8111 and 8112) and uses the \RequireHost\ constraint to serve different responses depending on which host header the request targets, allowing users to see how to route requests based on the specific host and port combination.

projects/endpoint-routing/new-routing-23 · high confidence

Add sample demonstrating htmx 4 after-init event and anti-forgery handling

A new sample application in the htmx-after-init directory demonstrates listening to the htmx 4 \htmx:after:init\ event to trigger an alert on element initialization, alongside a complete implementation of ASP.NET Core anti-forgery token integration for POST, PUT, PATCH, and DELETE requests.

projects/htmx/htmx-after-init · high confidence

Add sample demonstrating htmx:after:init event handling

A new sample project has been added to demonstrate how to listen to the \htmx:after:init\ event. The example includes a web application that renders links for various HTTP methods (GET, POST, PUT, PATCH, DELETE) and uses JavaScript to alert the ID of the clicked element immediately after HTMX initializes it. It also includes configuration for anti-forgery tokens and uses HTMX version 4.0.0 via CDN.

projects/htmx/htmx-after-on-load · high confidence

Add sample demonstrating scoped AppState for cross-component communication

A new sample application in the ComponentEvents project demonstrates how to manage communication between components located in different hierarchy levels using a scoped AppState object. The sample includes an AppState service registered with Scoped lifetime in Program.cs, allowing components like Child and Index to trigger notifications that are received and displayed by the Notification component in the shared layout, ensuring state is isolated per user session.

projects/blazor-ss/ComponentEvents · high confidence

Add sample demonstrating static file fallback with endpoint routing

A new sample project has been added to demonstrate how to serve a static HTML page when no other route matches, using the \MapFallbackToFile\ method in an ASP.NET Core application. The sample includes a \Program.cs\ that configures a specific route (\/contact/us\) and a fallback to \static/index.html\, along with the necessary static files and VS Code debugging configuration.

projects/endpoint-routing/new-routing-8 · high confidence

Add sample demonstrating the hx-upsert swap extension

A new sample application has been added to showcase the hx-upsert extension, which updates existing DOM elements by ID and inserts missing ones. The sample includes a minimal web server and an HTML page that loads htmx v4.0.0 along with the hx-upsert extension, demonstrating how to refresh a list of items using the upsert swap strategy.

projects/htmx/hx-upsert · high confidence

Add sample demonstrating writable JSON DOM element removal

A new sample project has been added to the json-21 location that demonstrates how to modify a JSON document using the writable DOM (JsonNode). The example parses a JSON array of objects and shows how to remove a specific property from an object and delete an element from the array, updating the response accordingly.

projects/json/json-21 · high confidence

Add sample demonstrating writable JSON DOM updates

A new sample project has been added to the json-20 location that demonstrates how to parse a JSON string into a mutable DOM structure using System.Text.Json.Nodes and modify its properties (such as updating names in an array of objects) before writing the result back to the HTTP response.

projects/json/json-20 · high confidence

Add sample for MVC without Views support

A new sample project has been added to demonstrate configuring ASP.NET Core MVC without Razor Pages or Views support by using \services.AddControllers\. This setup is presented as an ideal pattern for building Web APIs, featuring a simple controller that returns content directly.

projects/endpoint-routing/new-routing-17 · high confidence

Add sample for attaching metadata to inline middleware endpoints

This location introduces a new .NET sample demonstrating how to attach custom metadata to inline middleware endpoints using \IEndpointConventionBuilder.WithMetadata\. The project includes the necessary Visual Studio Code configuration files (launch.json and tasks.json) and a Program.cs that defines a \HelloWorld\ metadata class and attaches it to a root route, allowing users to retrieve and display this metadata within the request handling logic.

projects/endpoint-routing/new-routing-15 · high confidence

Add sample for browser indicator extension

A new sample application demonstrates the hx-browser-indicator extension, showing how to display the browser tab's native loading indicator during htmx requests, with an inline fallback for browsers that do not support the Navigation API.

projects/htmx/hx-browser-indicator · high confidence

Add sample for customizing Tag Helper HTML generation to use snake\_case IDs

This location introduces a sample application demonstrating how to customize the HTML generated by Tag Helpers. By registering a custom \IHtmlGenerator\ implementation (\LowerCaseIdHtmlGenerator\), the application converts automatically generated element IDs (such as those for input fields) from the default PascalCase format to snake\_case, making them easier to reference in JavaScript.

projects/razor-pages/custom-html-generator · high confidence

Add sample for detecting JSON property types

A new sample (json-26) demonstrates how to detect the type of a JSON property using System.Text.Json. The example parses a JSON string into a JsonNode, iterates through its properties, and uses GetValueKind to identify whether values are strings, booleans, numbers, arrays, or objects, displaying the results in a web application.

projects/json · high confidence

Add sample for dynamic MVC route transformation

A new sample project demonstrates how to handle MVC routing dynamically using \MapDynamicControllerRoute\ and \DynamicRouteValueTransformer\. The example shows how to process a URL pattern and set values in the \RouteValueDictionary\, allowing URLs like \/1\, \/2\, or \/3\ to be mapped to specific controller actions.

projects/endpoint-routing/new-routing-25 · high confidence

Add sample for dynamic Razor Pages routing

This location introduces a new sample application demonstrating how to handle Razor Pages routes dynamically using \MapDynamicPageRoute\ and \DynamicRouteValueTransformer\. The sample includes a \NumberTransformer\ that maps numeric URL segments (e.g., \/1\, \/2\) to specific Razor Pages (\/one\, \/two\, etc.), with a fallback to an undefined page for other inputs.

projects/endpoint-routing/new-routing-26 · high confidence

Add sample for generating URL-encoded query strings

A new sample project demonstrates how to use the \Microsoft.AspNetCore.Http.QueryString.Create\ method to generate URL-encoded query strings from a dictionary of key-value pairs. The application runs a web server that displays the input parameters and the resulting encoded query string value in a browser.

projects/request/query-string-create · high confidence

Add sample for generating URL-encoded query strings

A new sample project demonstrates how to use the \System.Net.Http.FormUrlEncodedContent\ class to generate query strings from name/value pairs. The application runs a web endpoint that displays the input dictionary and the resulting URL-encoded output, providing a practical reference for handling \application/x-www-form-urlencoded\ data.

projects/request/form-url-encoded-content · high confidence

Add sample for native OpenTelemetry tracing

A new sample project demonstrates ASP.NET Core's native OpenTelemetry tracing capabilities, which populate semantic convention attributes on the \Microsoft.AspNetCore\ activity source without requiring the \OpenTelemetry.Instrumentation.AspNetCore\ package. The sample configures a web application to export traces to the console, allowing users to observe attributes such as \http.request.method\, \url.path\, and \http.response.status\_code\ directly from the framework.

projects/net11/native-otel-tracing · high confidence

Add sample for serializing anonymous types with System.Text.Json

The json-3 project now includes a new sample demonstrating how to serialize anonymous types using System.Text.Json. The application exposes a root endpoint that returns a JSON payload containing mixed data types (string, int, bool, DateTimeOffset, and a dictionary) with specific formatting options such as indented output, camel-case naming policies, and null-value exclusion.

projects/json/json-3 · high confidence

Add sample for structured JSON console logging

A new sample project demonstrates how to configure .NET logging to output structured JSON to the console. The application uses the \AddJsonConsole\ extension to format log entries as JSON with indentation and configures specific log level filters for the 'Microsoft' and 'AppLogger' namespaces.

projects/logging/logging-3 · high confidence

Add simple Razor Pages routing example

This location introduces a minimal Razor Pages application demonstrating URL routing via the @page directive. It includes specific page examples: an About page at /AboutOurSchool, a Contact page at /Contact-Us, and a Blog page at /Blog/2018/4/20/itsmybirthday, all wired through a Program.cs entry point using the modern WebApplication builder pattern.

projects/razor-pages/routing · high confidence

Add singleton middleware example to middleware-10 project

The middleware-10 project now includes a Program.cs file that demonstrates a singleton middleware behavior. The TerminalMiddleware logs the request path and returns a response containing a timestamp captured at the time of the middleware's instantiation, illustrating that the instance is shared across requests.

projects/middleware/middleware-10 · high confidence

Add static files sample module

A new sample module named ForumModule has been added to demonstrate serving static files. It includes a controller, a view that renders a CSS stylesheet and an image with versioned caching support, and a basic CSS file that styles the body text in pink.

projects/orchard-core/static-files/ForumModule · high confidence

Add transient terminal middleware example

A new middleware example has been added to the project that demonstrates a transient middleware implementation. The middleware logs the request path and returns a response containing a timestamp that changes on every request, illustrating the transient lifecycle where a new instance is created for each request.

projects/middleware/middleware-11 · high confidence

Add up-flashes example demonstrating Unpoly 3.8.0 flash messages

This location introduces a new example application that demonstrates the \up-flashes\ attribute from Unpoly 3.8.0. The example includes a .NET WebApplication (\Program.cs\) that serves an HTML page using Unpoly 3.8.0 and Bootstrap 5.3.3, featuring navigation links that update an article section and display flash messages in a designated container. The implementation includes a helper extension to detect Unpoly requests via the \X-Up-Version\ header and returns flash message content upon interaction. Supporting files include a solution file, a README explaining the usage of \up-target\ and \up-cache\, and VS Code settings for the project.

projects/unpoly/up-flashes · high confidence

Add up-hungry example demonstrating untargeted content loading

A new example project demonstrates the Unpoly \up-hungry\ attribute, showing how to load fragment content onto an element that is not explicitly targeted by the navigation link. The example uses Unpoly 3.8.0 and includes a minimal ASP.NET Core application with a navigation link targeting an article tag, while a separate div with the \up-hungry\ attribute automatically updates with matching content from the response.

projects/unpoly/up-hungry · high confidence

Add validation-localization sample demonstrating automatic message localization

A new sample project in projects/net11/validation-localization demonstrates how AddValidation() and AddLocalization() work together to localize validation messages and display names. The sample registers a custom IStringLocalizerFactory backed by an in-memory dictionary supporting English and Spanish, and includes an HTML form with a culture switcher that persists the selected language in a cookie.

projects/net11/validation-localization · high confidence

Add web-utilities documentation and build scripts

Added a README file for the web-utilities project that documents Query Helpers, Parse Query String, and Reason Phrases utilities, along with build scripts (build.bat and build.sh) to compile the associated sample projects.

projects/web-utilities · high confidence

Added .NET 11 CSRF protection demo app

A new demonstration project for .NET 11 has been added to showcase automatic cross-origin (CSRF) protection. The app includes a minimal API endpoint that validates form submissions using the browser's \Sec-Fetch-Site\ and \Origin\ headers, and provides a web interface with copyable curl commands to test both safe same-origin requests and rejected cross-site requests. It also demonstrates how to opt out of antiforgery validation on specific endpoints using \.DisableAntiforgery()\.

projects/net11/csrf-protection · high confidence

Added .NET 6 middleware demonstration project

A new middleware example project has been added to demonstrate dependency injection and middleware ordering in .NET 6. The project registers custom services and applies a terminal middleware that constructs a response using injected dependencies, illustrating how parameter order in middleware constructors interacts with the DI container.

projects/middleware/middleware-8 · high confidence

Added .NET 6 rewrite demo application

A new .NET 6 web application has been added to the rewrite-4 project. It demonstrates URL rewriting by capturing paths ending in extensions (like .html or .aspx) and redirecting them with a 301 Moved Permanently status, passing the captured path and extension as query parameters. The app includes a simple HTML response page to display the captured values for verification.

projects/rewrite/rewrite-4 · high confidence

Added .NET 8 Problem Details middleware samples

Added three new sample applications demonstrating how to enable and customize Problem Details (RFC 7807) responses for unhandled exceptions in .NET 8. The samples cover basic integration, customizing the response via options, and manipulating the response using IProblemDetailsService, along with corresponding build scripts and documentation.

projects/problem-details-middleware · high confidence

Added .NET 8 health check sample applications

The health-check project now includes six sample applications demonstrating ASP.NET Core health checks, upgraded to target .NET 8. These samples cover basic health endpoints, custom response writers, handling unhandled exceptions in checks, HTTP status code verification, multiple concurrent checks, and reporting a 'Degraded' status. A README and build scripts (batch and shell) have been added to guide users through these examples.

projects/health-check · high confidence

Added ASP.NET Core MVC example for Accept-Language header localization

This location introduces a new ASP.NET Core MVC sample application that demonstrates how to use the Accept-Language HTTP header to determine request culture. The project configures the application to support French (fr-FR) and English (en-US) cultures, explicitly clearing default providers to rely solely on the AcceptLanguageHeaderRequestCultureProvider. It includes resource files for localized strings and a view with JavaScript that sends AJAX requests with specific Accept-Language headers to an API endpoint, allowing users to toggle between English and French greetings.

projects/mvc/localization/mvc-localization-8 · high confidence

Added ASP.NET Core MVC tag helper samples

New sample projects have been added to the MVC tag-helper directory to demonstrate ASP.NET Core tag helper functionality. These include examples for a basic custom alert tag, a parameterized alert tag supporting multiple styles (success, warning, info, danger), and built-in tag helpers for cache busting static assets like images, stylesheets, and scripts using the asp-append-version attribute.

(repo-wide) · high confidence

Added Blazor Server app root components

The JsIntegration/Components folder now includes the core App.razor root component, which configures the application router and provides a 'Page not found' fallback view, along with \_Imports.razor to establish global namespace imports for HTTP, forms, routing, JS interop, web utilities, and authorization.

projects/blazor-ss/JsIntegration/Components · high confidence

Added Blazor Server layout and page examples

New Razor components have been added to the Blazor Server application to demonstrate layout inheritance and nesting. This includes a TopLayout component with a header, navigation, and footer, two nested layout components (NestedLayout and NestedLayout2), and corresponding pages (Index, PageUsingNestedLayout, PageUsingNestedLayout2) that utilize these layouts. The navigation in TopLayout links to the home page and the two nested layout pages.

projects/blazor-ss/Layout/Components/Pages · high confidence

Added Blazor Server layout and view imports

The application now includes the main layout page (Index.cshtml) which serves as the entry point for the Blazor Server app, integrating Bootstrap 5.1.3 for styling and configuring server-side prerendering. Additionally, \_ViewImports.cshtml has been added to define the namespace for layout components and enable MVC tag helpers, ensuring proper rendering context for the Blazor components.

projects/blazor-ss/Layout/Pages · high confidence

Added Blazor Server layout components

The Blazor Server application now includes the core layout structure files, specifically App.razor and \_Imports.razor, within the Layout/Components directory. App.razor defines the application router with a basic 'Page not found' fallback, while \_Imports.razor establishes global namespace imports for HTTP, forms, routing, JS interop, web utilities, and authorization.

projects/blazor-ss/Layout/Components · high confidence

Added Blazor WebAssembly component samples

The projects/blazor-wasm directory now contains a collection of Blazor WebAssembly sample applications demonstrating various component patterns. These include basic routing and layout (Component), component interaction via parameters and EventCallback (ComponentFour, ComponentFive, ComponentNine, ComponentEighteen), arbitrary parameter capture (ComponentEleven, ComponentFourteen), custom data binding modifiers like @bind:after and @bind:get/set (ComponentEighteen, ComponentNineteen), cascading values by name (ComponentSeventeen), and state management behaviors (ComponentSix).

projects/blazor-wasm · high confidence

Added Blazor sample for Label and DisplayName components

A new sample application has been added to demonstrate the updated Label and DisplayName components. The sample showcases how the Label component renders accessible labels using both nested and non-nested (for/id association) patterns, extracting text from \[Display\] and \[DisplayName\] attributes, and how the DisplayName component displays property metadata independently, mirroring MVC's Html.DisplayNameFor() functionality.

projects/net11/label-display-name · high confidence

Added MVC model binding from route sample

A new sample project demonstrating how to bind route parameters to a class using the \[FromRoute\] attribute in ASP.NET Core MVC. The application defines a GreetingParams class with properties for UserId, Name, IsAmazing, and Age, and exposes multiple controller actions that map different URL patterns (such as /{name}, /user/{userid:int}, and combined paths) to this class, allowing users to see how route data is parsed and bound.

projects/mvc/model-binding-from-query, projects/mvc/model-binding-from-route · high confidence

Added OpenTelemetry sample projects and build scripts

This change introduces three new OpenTelemetry sample projects (open-telemetry-1, -2, and -3) along with a fourth reference (open-telemetry-4) in the build scripts. The samples demonstrate basic tracing with service names, recording events to spans, and recording attributes to spans. A new README documents these examples, and build scripts (build.bat and build.sh) are added to facilitate building all samples.

projects/open-telemetry · high confidence

Added Polly rate limiter sample with build scripts

A new sample project demonstrating how to use the Polly library to implement a rate limiter with HttpClient has been added. This includes a README explaining the sample's purpose and cross-platform build scripts (build.bat and build.sh) to compile the rate-limiter-http-client example.

projects/polly · high confidence

Added URL Rewrite project documentation and build scripts

Added a new README file documenting six URL rewriting examples (basic redirects, permanent redirects, and custom logic via IRule and lambda) and included build scripts (build.bat and build.sh) to compile these examples.

projects/rewrite · high confidence

Added URL rewrite capability to capture path and extension via query parameters

The application now includes a new entry point (Program.cs) that implements a URL rewriting rule. This rule intercepts requests for files ending in an extension (like .html or .aspx) and redirects them to the root path, passing the original filename and extension as 'path' and 'ext' query parameters. This allows the application to handle these requests dynamically rather than serving static files.

projects/rewrite/rewrite-2 · high confidence

Added UriHelper.FromAbsolute demo application

A new sample application has been added to demonstrate the \UriHelper.FromAbsolute\ method. This ASP.NET Core app accepts an absolute URI and displays its parsed components (scheme, host, path, query string, and fragment) in a web interface, helping users understand how the helper method breaks down URI strings.

projects/uri-helper/uri-helper-from-absolute · high confidence

Added YARP reverse proxy demo with .NET 6 Blazor and Web API

A new basic demo has been added to the YARP section, showcasing a reverse proxy setup using .NET 6. The demo consists of a Blazor WebAssembly frontend, an ASP.NET Core Web API backend, and a YARP proxy layer that routes traffic between them. The proxy is configured via \appsettings.json\ to route API requests to the backend and all other requests to the frontend, demonstrating a standard multi-service architecture.

projects/yarp · high confidence

Added anti-forgery token validation demo

A new Program.cs file was added to the anti-forgery project that demonstrates ASP.NET Core anti-forgery protection. The application serves an HTML form containing a hidden anti-forgery token for POST requests and validates the token upon submission, returning a success message if the validation passes.

projects/request/anti-forgery · high confidence

Added async validation sample for minimal APIs

A new sample project demonstrates the .NET 11 \Microsoft.Extensions.Validation\ stack, showing how to use \AddValidation()\, \\[ValidatableType\]\, \AsyncValidationAttribute\, and \IAsyncValidatableObject\ to validate request bodies asynchronously without blocking threads. The sample includes a minimal API endpoint and an interactive HTML form to test async validation rules, such as checking for unique emails and cross-property constraints.

projects/net11/async-validation · high confidence

Added benchmark comparing snake\_case conversion performance

A new benchmark project has been added to compare two approaches for converting CamelCase strings to snake\_case: a span-based implementation adapted from Newtonsoft.Json and a LINQ-based approach. The project includes a README with build instructions and uses BenchmarkDotNet to measure execution time and memory allocation for both methods.

projects/json/json-8 · high confidence

Added build scripts and documentation for IHostedService examples

Added build automation scripts (build.bat and build.sh) to compile the two background task example projects (ihosted-service-1 and ihosted-service-2). Included a README.md documenting these examples, specifically highlighting the use of the new IHostedService interface with a timer in the second example, and noting the target framework as dotnet8.

projects/ihosted-service · high confidence

Added build scripts and documentation for middleware samples

Added build automation scripts (build.bat and build.sh) and a README file for the middleware sample projects. The build scripts allow users to compile all 14 middleware examples (middleware-0 through middleware-13) with a single command, while the README provides an overview of the middleware concepts covered in each sample, such as pipeline configuration, dependency injection, and error handling.

(repo-wide) · high confidence

Added build scripts and documentation for syndication samples

Added build automation scripts (build.bat and build.sh) and a README file for the syndication samples. The build scripts allow users to compile the three included examples: the basic RSS reader (syndication-1), the RSS with extensions reader (syndication-2), and the NewsServer MVC demo (newsserver-mvc). The README provides an overview of the samples and links to their respective directories.

projects/syndications · high confidence

Added build scripts and documentation for the PDF Viewer sample

Users can now easily build the PDF Viewer sample using the newly added build.bat and build.sh scripts, which execute the dotnet build command for the pdf-viewer directory. The README has been updated to document this collection of mini applications, specifically highlighting the PDF Viewer sample that demonstrates building a viewer using PDF.js, alongside the Pokedex API sample.

projects/mini · high confidence

Added build scripts and documentation for the utils project

The utils project now includes build automation scripts (build.bat and build.sh) that compile the three sub-projects: http-status-codes, media-type-names, and media-type-names-2. Additionally, a README.md file has been added to document the available utilities, specifically explaining the usage of status code helpers and MIME type name constants.

projects/security, projects/utils · high confidence

Added custom feature override demonstration

A new Program.cs file has been added to the features-server-custom-override project, implementing a minimal ASP.NET Core application that demonstrates how to set and retrieve custom features within the request pipeline. The code defines an ICustomFeature interface and a CustomFeature class, showing how middleware can inject data into the HttpContext.Features collection and how subsequent middleware or the final handler can access and modify that state.

projects/features/features-server-custom-override · high confidence

Added diagnostics samples and build scripts for .NET 8

The diagnostics project now includes a set of five samples demonstrating ASP.NET Core diagnostic features, including a welcome page, developer exception page, custom global exception pages, and status code pages. A new README documents these samples, and build scripts (build.bat and build.sh) have been added to build all five samples. The project is now targeted at .NET 8.

projects/diagnostics · high confidence

Added diagnostics-3 sample with custom error handling

A new diagnostics sample (projects/diagnostics/diagnostics-3) was added that demonstrates ASP.NET Core minimal hosting with a custom exception handler. The sample configures UseExceptionHandler to return a 500 status code and an HTML page showing the encoded error message and source, and it triggers a test exception on every request to verify the behavior.

projects/diagnostics/diagnostics-3 · high confidence

Added endpoint routing demonstration project

A new sample application has been added to demonstrate ASP.NET Core endpoint routing capabilities. The project showcases how to use the LinkGenerator service to construct URIs for various controller actions, including standard routes, attribute-based routes, and routes with custom constraints. It also illustrates the behavior when a route cannot be resolved, providing a practical example of URL generation in a minimal hosting model setup.

projects/endpoint-routing/endpoint-routing-3 · high confidence

Added error-handling middleware to the middleware-13 project

The middleware-13 project now includes a new Program.cs file that registers and uses an ErrorHandlingMiddleware. This middleware intercepts exceptions during request processing; if an exception implements the ICustomApiException interface, it returns the specific HTTP status code and message defined by that interface, otherwise it defaults to a 500 Internal Server Error with a generic JSON error response.

projects/middleware/middleware-13 · high confidence

Added gRPC client streaming and bidirectional streaming samples

New sample projects have been added to demonstrate gRPC streaming capabilities. The grpc-3 sample implements client streaming, where a client sends a sequence of fortune cookie messages that the server processes and returns as a single aggregated response. The grpc-4 sample implements bidirectional streaming, allowing the client and server to exchange ping/pong messages simultaneously with configurable delays.

projects/grpc/grpc-3, projects/grpc/grpc-4 · high confidence

Added gRPC sample for nested types and repeated values

A new gRPC sample project has been added to demonstrate sending nested types and repeated values (lists) using Protocol Buffers. The sample includes a client and server implementation where the client sends a request containing a list of 'SuperPower' capabilities, and the server processes and returns these repeated fields along with a timestamp.

projects/grpc/grpc-6 · high confidence

Added generic-host examples with hosted services and logging configuration

New example projects (generic-host-3 and generic-host-4) have been added to demonstrate the .NET Generic Host pattern. These samples configure hosted services (HelloWorldService variants) and set up console logging with filters to exclude Microsoft framework logs, illustrating how to run background tasks within a hosted environment.

projects/generic-host/generic-host-3 · high confidence

Added generic-host logging configuration sample

A new sample application has been added to the generic-host project that demonstrates how to configure logging within a .NET Generic Host. The application sets up a hosted service that logs debug messages ('Hello world' and 'Goodbye') and configures the logging pipeline to clear existing providers, add a console provider, and set the minimum log level to Trace.

projects/generic-host/generic-host-configure-logging · high confidence

Added generic-host sample demonstrating configuration and hosted service setup

A new sample project has been added to demonstrate configuring a .NET Generic Host. It shows how to inject in-memory configuration values, register a background hosted service, and configure logging to filter out Microsoft framework messages.

projects/generic-host/generic-host-configure-host · high confidence

Added logging-2 sample with category-based log filtering

A new logging sample (logging-2) demonstrates how to configure log levels per category using the .NET generic host. It adds console logging and applies filters to show only Warning-level messages and above for Microsoft namespaces, while showing Trace-level messages for the AppLogger namespace. The sample also reads a greeting message from appSettings.json to include in the HTTP response.

projects/logging/logging-2 · high confidence

Added middleware demonstration for MapWhen vs UseWhen behavior

A new Program.cs file introduces a sample ASP.NET Core application that demonstrates the difference between MapWhen and UseWhen middleware. The app registers MiddlewareHtml, MiddlewareTitle, MiddlewareFooter, and MiddlewareNavigation, and conditionally applies MiddlewareUsedByMapWhen for paths starting with /map-when-example and MiddlewareUsedByUseWhen for paths starting with /use-when-example. This allows users to observe how MapWhen branches execution (excluding the footer) while UseWhen does not, providing a concrete example of conditional middleware behavior.

projects/middleware/middleware-12 · high confidence

Added middleware-5 demo application

A new demo application has been added to the middleware-5 project that demonstrates nested routing behavior. The app defines a /hello endpoint which contains a nested /world route, allowing users to observe how Path and PathBase properties behave in nested middleware scenarios via simple text responses and navigation links.

projects/middleware/middleware-5, projects/request/query-string-1 · high confidence

Added minimal static file serving sample

A new sample project has been added that demonstrates serving static files using a minimal API approach. The application configures static file support with a single middleware call and includes sample HTML and CSS assets in the wwwroot folder for testing.

projects/file-provider/serve-static-files-1 · high confidence

Added query string inspection demo

A new endpoint has been added to the application that displays all query string parameters from the current request. When accessed, it renders an HTML page listing each key-value pair found in the URL query string, along with a link to test the functionality by appending specific parameters (message, isTrue, morning) to the URL.

projects/request/query-string-3 · high confidence

Added query string parsing demo application

A new .NET 6 web application has been added to demonstrate parsing raw query strings using \QueryHelpers.ParseQuery\ from \Microsoft.AspNetCore.WebUtilities\. The application serves an HTML page that displays the parsed key-value pairs from the request URL and includes interactive links to test various query string formats, such as single values, multiple values for the same key, and empty values.

projects/web-utilities/web-utilities-query-helpers-2 · high confidence

Added query-string helper demonstration application

A new console application has been added to the web-utilities-query-helpers project that demonstrates the usage of the ASP.NET Core WebUtilities library. The application initializes a WebApplication, constructs query strings using QueryHelpers.AddQueryString with sample parameters, and serves the resulting paths in the HTTP response.

projects/web-utilities/web-utilities-query-helpers · high confidence

Added sample application for the EnvironmentView component

A new Blazor sample application has been added to demonstrate the \EnvironmentView\ component, which enables conditional rendering of UI content based on the hosting environment. The sample includes the necessary Razor pages, layout, and program entry point to show how the component handles \Include\ and \Exclude\ logic for environments like Development, Staging, and Production.

projects/net11/environment-view · high confidence

Added sample application for the hx-preload extension

A new sample project demonstrating the hx-preload extension has been added. It includes a minimal web application that prefetches content on mouseover to warm the response for subsequent clicks, along with documentation explaining the extension's purpose.

projects/htmx/hx-preload · high confidence

Added sample demonstrating JSON DOM primitive access

A new sample project has been added to the json samples directory that demonstrates parsing JSON strings and accessing primitive values (numbers, strings) and arrays using the System.Text.Json.Nodes API. The sample includes a minimal web application that parses JSON data and returns the extracted values in the HTTP response, along with documentation explaining the usage.

projects/json/json-12 · high confidence

Added sample demonstrating JsonArray construction

A new sample project has been added to the JSON samples collection that demonstrates how to construct JSON documents using the \JsonArray\ and \JsonObject\ classes from \System.Text.Json.Nodes\. The example illustrates both verbose construction using \JsonValue.Create\ and a more concise approach leveraging implicit operators, showing users how to build and serialize complex JSON structures programmatically.

projects/json/json-19 · high confidence

Added sample demonstrating hx-ignore and hx-disable usage

A new sample project has been added to demonstrate the htmx 4 behaviors for \hx-ignore\ and \hx-disable\. The sample shows how \hx-ignore\ prevents htmx from processing an element and its subtree, and how \hx-disable\ disables an element while its request is in progress, mirroring the previous \hx-disabled-elt\ behavior.

projects/htmx/hx-ignore · high confidence

Added sample demonstrating the ShortCircuit attribute

A new sample project in projects/net11/short-circuit-attribute illustrates the usage of the \[ShortCircuit\] attribute, which allows endpoints to bypass the middleware pipeline (such as auth, CORS, and logging) and run immediately after routing. The included Program.cs and README.md show how to apply this attribute to health check endpoints and verify the behavior via HTTP headers.

projects/net11/short-circuit-attribute · high confidence

Added session management demo application

A new ASP.NET Core application has been added to demonstrate session management capabilities. The application configures a distributed memory cache and session services, then implements middleware to store a message and the current year in the session, and a final handler to retrieve and display these values in the user's response.

projects/features/features-session · high confidence

Custom HTTP feature middleware implementation

The features-server-custom module now includes a Program.cs file that demonstrates a custom HTTP feature pattern. It registers middleware to set an ICustomFeature on the HttpContext, which subsequent middleware or the final handler can retrieve to access custom data (specifically a 'Greetings' string). This allows for passing context-specific data through the request pipeline without relying on standard HttpContext items.

projects/features/features-server-custom · high confidence

Demo app for htmx 4 error handling

A new demo application has been added to showcase htmx 4's consolidated error handling. The app demonstrates how network failures and timeouts trigger the unified \htmx:error\ event, allowing users to inspect \event.detail.error\ for details, while noting that HTTP 4xx/5xx responses continue to use the separate \htmx:response:error\ event.

projects/htmx/htmx-error · high confidence

Demo for updating multiple DOM targets with Unpoly

A new .NET web application demonstrates how to use Unpoly 3.8.0 to update multiple distinct DOM elements (by tag, ID, and class) simultaneously using the \up-target\ attribute. The app serves a page with three separate content areas and a link that triggers updates to all three targets in a single request, returning the corresponding HTML fragments for each selector.

projects/unpoly/up-target-2 · high confidence

Demonstrate host matching using WithMetadata and HostAttribute

A new sample project demonstrates how to configure endpoint routing to respond differently based on the request host. The application listens on localhost ports 8111 and 8112, using \WithMetadata\ and \HostAttribute\ to bind specific routes to each host, providing an alternative to the \RequireHost\ method used in previous examples.

projects/endpoint-routing/new-routing-24 · high confidence

Demonstration of MapWhen and Map middleware usage

The project now includes a Program.cs file that demonstrates the direct usage of MapWhenMiddleware and MapMiddleware in an ASP.NET Core application. The application registers a MapWhen middleware that responds to requests containing 'hello' in the path, and a Map middleware that handles requests to '/greetings', while the default endpoint provides links to both paths.

projects/middleware/middleware-7 · high confidence

Demonstration of capturing route data in Razor Pages

This location introduces a sample application that demonstrates how to capture and display route data within Razor Pages. It includes specific page examples: Contact.cshtml for simple parameter capture (/contact-us/{id}), About.cshtml for typed integer parameters (/About/{section}/{year:int}), Catalog.cshtml for optional parameters (/Product/{ean:int?}), and Blog.cshtml for catch-all routing (/Blog/{\*path}). The Index.cshtml page serves as a navigation hub linking to these examples, while Program.cs sets up the minimal hosting model with Razor Pages support.

projects/razor-pages/routing-2 · high confidence

Hydro framework samples for component lifecycle, nesting, and events

The projects/hydro directory now includes a collection of sample applications demonstrating the Hydro framework's capabilities. These samples cover component lifecycle hooks (Mount/Render), data flow and nesting with the key parameter, child-to-parent and global event dispatching (including subject-based filtering), and cookie management with global state updates.

projects/hydro · high confidence

Initial Blazor Server component structure

The Blazor Server application now includes the core component files required for routing and page rendering. This adds the main App.razor layout with a NotFound fallback, the Index.razor page displaying a 'Hello, world!' message, and \_Imports.razor to provide necessary namespace imports for forms, routing, JS interop, and authorization.

projects/blazor-ss/HelloWorld/Components · high confidence

Initial Blazor Server page structure for JsIntegration

The JsIntegration application now includes the foundational Razor view files required to render the Blazor Server UI. The new Index.cshtml page serves as the entry point, configuring the HTML layout, linking Bootstrap 5.1.3 and custom styles, and initializing the Blazor Server component with prerendering. The \_ViewImports.cshtml file establishes the necessary namespace and tag helper imports for the pages directory.

projects/blazor-ss/JsIntegration/Pages · high confidence

Initial Orchard Core samples section with build scripts and documentation

This change introduces a new 'Orchard Core' section to the samples repository, providing documentation and build automation for advanced modular and multi-tenant application patterns. A new README.md outlines samples for MVC and Razor Pages routing, static file handling, and multi-tenancy configuration, while accompanying build.bat and build.sh scripts allow users to build the host projects for these specific samples (routing, routing-2, routing-3, static-files, and multi-tenant) in one step. A sample Index.cshtml for the static-files module is also added to demonstrate serving static content within an Orchard Core module.

projects/orchard-core · high confidence

Initial rate-limiter-http-client demo with concurrency limiting and retry logic

A new demo application has been added to the \projects/polly/rate-limiter-http-client\ location that configures an HTTP client with Polly resilience policies. The client enforces a concurrency limit of 5 permits with a queue limit of 5, and includes a retry strategy that attempts up to 3 retries with fixed delays (0s, 1s, 5s) for non-200 HTTP responses or when a \RateLimiterRejectedException\ is thrown. The project includes a solution file, a README explaining the policy configuration, and a Program.cs that sets up the web application with logging and the resilience handler.

projects/polly/rate-limiter-http-client · high confidence

Introduce ChatR Blazor Server sample with SignalR integration

Adds the ChatR sample application, demonstrating how to host a SignalR Hub alongside Blazor Server. The implementation includes a NotificationHub for broadcasting messages, a NotificationService for client-side connection management, and the necessary Program.cs entry point to map the SignalR and Blazor endpoints.

projects/blazor-ss/ChatR · high confidence

Introduce markdown-server-middleware to serve Markdown as HTML

A new middleware component has been added to serve Markdown files as HTML. The server maps URL paths to Markdown files within a 'markdown' directory (e.g., /hello serves markdown/hello.md), converts them using Markdig, and serves them with a text/html content type. It includes a default index page and handles 404s for missing files.

projects/markdown-server-middleware · high confidence

Introduce server address inspection middleware

A new ASP.NET Core application has been added that exposes a middleware component to inspect and display the server's bound addresses. This middleware retrieves the list of addresses from the IServerAddressesFeature and returns them as a plain-text response, allowing users to verify which network endpoints the server is listening on.

projects/features/features-server-addresses-2 · high confidence

Introduces a response buffering middleware sample

The project now includes a Program.cs file that demonstrates a custom middleware component. This middleware buffers the HTTP response body, allowing subsequent middleware to write content before it is sent to the client, and then copies the buffered content to the actual response stream.

projects/middleware/middleware-2 · high confidence

Introduces extension-based image redirection middleware

The application now includes a custom rewrite rule that automatically redirects requests for .png and .jpg files to specific internal paths (/images/png and /images/jpeg respectively) using 301 permanent redirects. This prevents infinite redirect loops by checking if the request path already starts with the target segment, ensuring static image assets are served correctly through the new routing logic.

projects/rewrite/rewrite-5 · high confidence

Introduction of a basic HTTP verb echo endpoint

A new entry point file (Program.cs) has been added to the request-verb project, implementing a minimal web application that responds to any incoming request by echoing the HTTP method used (e.g., GET, POST) in the response body.

projects/request/request-verb · high confidence

Minimal Hosting API samples for ASP.NET Core

The minimal-hosting location now provides a comprehensive set of samples demonstrating the new minimal hosting APIs in ASP.NET Core. These samples cover the \WebApplication\ class for quick setups (welcome page, logging, configuration, lifetime events, middleware, and server URL/port configuration), the \WebApplicationBuilder\ for configuring services (MVC, Razor Pages, environment, logging, web root), and specialized builders like \CreateSlimBuilder\ and \CreateEmptyBuilder\. The collection also includes examples for static file serving, WebSockets, and cross-platform path handling.

projects/minimal-hosting · high confidence

New .NET 10 sample project demonstrating project-less execution

The \projects/net10\ directory now includes a \dotnet-run\ sample that demonstrates the new .NET 10 capability to run ASP.NET Core web applications directly from a single source file (e.g., \dotnet run Program.cs\) without requiring a project file. The sample also configures VS Code color themes for the workspace.

projects/net10 · high confidence

New .NET 11 sample demonstrating OpenAPI 3.2 Server-Sent Events support

A new sample application in the projects/net11/open-api-13 directory demonstrates how to use OpenAPI 3.2's itemSchema feature with Server-Sent Events (SSE). The sample exposes a /todos/stream endpoint that returns a text/event-stream, allowing clients to receive typed Todo items via SSE while the OpenAPI document correctly describes the per-event payload structure.

projects/net11/open-api-13 · high confidence

New .NET 6 minimal-hosting Tag Helper demo

A new sample project at projects/mvc/tag-helper/tag-helper-5 demonstrates ASP.NET Core MVC tag helpers using the .NET 6 minimal hosting model. It introduces custom tag helpers (alert, danger, warning) that compose nested alert components with Bootstrap 5 styling, illustrating parent-to-child data passing via TagHelperContext items.

projects/mvc/tag-helper/tag-helper-5 · high confidence

New .NET 6 runtime information sample application

A new sample application has been added to the projects/version directory that displays detailed runtime and environment information. When run, the application serves an HTML page showing the .NET version, CoreCLR and CoreFX build details, OS description, architecture, and processor count. This sample is built using the .NET 6 WebApplication API.

projects/version · high confidence

New .NET 6 sample demonstrating Redis-backed HTTP sessions

A new sample application has been added to demonstrate session management using Redis as the backing store in .NET 6. The application configures the StackExchangeRedisCache provider and the ASP.NET Core Session middleware, then uses the ISessionFeature to store and retrieve string, integer, and serialized object data across requests.

projects/features/features-session-redis-2 · high confidence

New .NET 6 static file serving sample with directory browsing

A new sample application has been added to the file-provider project, targeting .NET 6. This application demonstrates serving static files and enabling directory browsing at the /browse path. It includes a basic HTML index, a CSS file, and a sample text file in the wwwroot directory to illustrate the functionality.

projects/file-provider/serve-static-files-6 · high confidence

New ASP.NET Core 11 sample project with .NET 11 RC1 SDK

A new \projects/net11\ directory has been added to host micro-samples for ASP.NET Core 11 features, pinned to the .NET 11 RC1 SDK via \global.json\. This location introduces samples demonstrating dynamic output cache policy selection using \IOutputCachePolicyProvider\ (with tenant-specific cache keys), C\# union types in minimal APIs with native \System.Text.Json\ serialization and OpenAPI 3.2 \anyOf\ support, and a README index covering additional upcoming features like Zstandard compression, async validation, and Blazor SSR improvements.

projects/net11 · high confidence

New ASP.NET Core Data Protection samples for Azure and custom encryption

Added new sample applications demonstrating ASP.NET Core Data Protection key storage and encryption strategies. These include an Azure Storage Blob key store, an Azure Key Vault and Blob storage combination for encrypted key persistence, and a custom XML encryptor implementation. Each sample provides a working Razor Pages application showing how to configure \IDataProtectionBuilder\ to persist keys to Azure Blob Storage or local file systems and encrypt keys using Azure Key Vault or custom logic.

projects/security/dataprotection · high confidence

New Blazor SSR demo for \[SupplyParameterFromSession\] attribute

A new sample application demonstrates the \\[SupplyParameterFromSession\]\ attribute in Blazor Server-Side Rendering (SSR). The demo shows how component properties can automatically read from and write to HTTP session values (serialized via System.Text.Json) across requests, illustrated by a multi-step form that persists its progress state. The sample includes the necessary server-side configuration, such as adding distributed memory cache and session middleware, to support this declarative session binding.

projects/net11/supply-parameter-from-session · high confidence

New Blazor Server RSS Reader sample with streaming updates

A new Blazor Server application (RssReader-2) has been added to demonstrate consuming RSS feeds using C\# 8.0 IAsyncEnumerable. The sample fetches multiple feeds (including BBC and Hacker News) and streams the results to the UI in real-time, featuring an explicit User-Agent header to satisfy feed providers and a simulated delay to visualize the streaming behavior.

projects/blazor-ss/RssReader-2 · high confidence

New CacheView demo application for Blazor Server-Side Rendering

A new demo application has been added to showcase the CacheView component, which caches the rendered output of a Blazor Server-Side Rendering (SSR) subtree. The project includes an Index page demonstrating how to wrap expensive components (like ExpensiveWidget) in CacheView to replay cached HTML on hits, avoiding re-initialization. It also features a Violation page to illustrate error handling when using incompatible components like Virtualize within a cache context. The application is configured with HybridCache to support local and distributed caching strategies.

projects/net11/cache-view · high confidence

New HTMX form example using Pico CSS and HTMX 4

Added a new sample application in projects/htmx/form-2 that demonstrates processing forms with HTMX's hx-post attribute. The example uses HTMX version 4.0.0 and Pico CSS v2 for styling, featuring a form with text, textarea, select, checkbox, and radio inputs that submits data via POST and displays the results in a table upon successful processing.

projects/htmx/form-2 · high confidence

New HTMX form handling sample with Pico CSS and HTMX 4

A new sample project has been added to demonstrate form processing using HTMX. The example utilizes HTMX version 4 (loaded via CDN) and styles the interface with Pico CSS v2. It implements a simple POST endpoint that returns a success alert upon submission, including proper antiforgery token handling for security.

projects/htmx/form · high confidence

New HTMX sample demonstrating query string access with anti-forgery support

Added a new sample application that demonstrates how to pass and access query string parameters using all HTTP verbs supported by HTMX (GET, POST, PUT, PATCH, DELETE). The sample includes server-side anti-forgery validation for non-GET requests and client-side configuration to automatically attach anti-forgery tokens to HTMX requests, ensuring secure handling of state-changing operations.

projects/htmx/header-hx-trigger-2, projects/htmx/query-string · high confidence

New HTTP/2-only endpoint routing sample

A new sample application has been added to demonstrate configuring Kestrel endpoint defaults to enforce HTTP/2. The application is built using the .NET 6 minimal hosting model and restricts all endpoints to HTTP/2 protocol only, requiring users to access the service via HTTPS (e.g., https://localhost:5001/).

projects/endpoint-routing/new-routing-22 · high confidence

New JSON serialization customization samples

Added three new sample projects (json-23, json-24, json-25) demonstrating advanced contract customization with \System.Text.Json\'s \DefaultJsonTypeInfoResolver\. The samples illustrate how to conditionally ignore negative integer values, force integer properties to serialize as strings, and dynamically inject a timestamp property into the serialized output.

projects/json/json-23, projects/json/json-24, projects/json/json-25 · high confidence

New JWT authentication demo application

A new MVC-based sample application has been added to demonstrate JSON Web Token (JWT) issuance and validation. The project includes a HomeController that provides a web interface for generating a signed JWT (using HMAC-SHA256) and a separate endpoint to decode and display the contents of a provided token. The solution is configured for .NET 6 and includes specific Visual Studio Code color theme settings.

projects/mvc/jwt · high confidence

New MVC sample for XML output formatting

Added a new MVC sample application that demonstrates how to configure XML output formatters. The application registers XmlSerializerOutputFormatter and exposes a controller endpoint that returns a Greeting object with XML content type.

projects/mvc/mvc-output-xml · high confidence

New MapShortCircuit sample demonstrates request skipping

A new sample project has been added to demonstrate the MapShortCircuit and ShortCircuit APIs, which allow applications to respond to requests (such as for robots.txt or favicon.ico) without executing the full middleware pipeline, thereby skipping processes like authentication and CORS.

projects/map-short-circuit · high confidence

New Markdown Server Application

A new web application has been added to serve Markdown files as HTML. The server maps URL paths to Markdown files within a 'markdown' directory (e.g., /hello serves markdown/hello.md) and renders them using the Markdig library. It includes sample content files for an index, a hello page, and an about us page.

projects/markdown-server · high confidence

New OpenTelemetry tracing example with span events

Added a new ASP.NET Core sample application that demonstrates recording events into an existing OpenTelemetry span. The application configures tracing with ASP.NET Core instrumentation and a console exporter, and the root endpoint records specific events (such as 'Getting trace id') into the current activity context before responding, allowing users to see how span events are captured and displayed in the trace output.

projects/open-telemetry/open-telemetry-2 · high confidence

New Orleans-based RSS Reader sample with Redis persistence

A new RSS reader application has been added to the Orleans samples, demonstrating a silo-based architecture using .NET 6. The app utilizes Orleans grains to manage feed sources and results, with state persisted to Redis via the \AddRedisGrainStorage\ provider. It features a \FeedFetcherReminder\ grain that uses Orleans reminders to periodically fetch updates from configured RSS/Atom feeds (such as Scripting News and Reddit/r/dotnet) and stores unique items in Redis. The application exposes a web interface at the root path that displays the latest fetched feed items, requiring a running Redis instance on localhost:6379.

projects/orleans/rss-reader-2 · high confidence

New Orleans-based RSS reader sample with OPML import and Redis storage

This location introduces a new RSS reader sample application built on .NET 6 and Orleans. The application imports RSS feed subscriptions from an OPML file, manages feed sources and results using Orleans grains, and persists data to Redis. It utilizes Orleans reminders to periodically fetch feed updates and publishes the results to an Orleans stream for display in a simple web interface.

projects/orleans/rss-reader-3, projects/orleans/rss-reader-6 · high confidence

New Orleans-based RSS reader sample with Redis storage and reminders

A new RSS reader sample (rss-reader-5) has been added to the Orleans samples. It demonstrates an Orleans silo configured with Redis for grain storage and in-memory reminders, using grains to manage feed sources and fetch items on a scheduled basis. The application exposes a web interface that displays the latest feed items and allows users to view the status of configured feed sources.

projects/orleans/rss-reader-5 · high confidence

New RSS syndication endpoint in syndication-1

The syndication-1 project now includes a new Program.cs that serves as a web application. It fetches RSS feed items from 'http://scripting.com/rss.xml', extracts their descriptions, and renders them as an HTML list on the response page.

projects/syndications/syndication-1 · high confidence

New RSS syndication endpoint with outline support

A new web application has been added to the syndication-2 project that fetches and parses an RSS feed (defaulting to scripting.com/rss.xml). It extracts standard item details and specifically looks for 'source:outline' metadata, presenting the results as an HTML page with styled lists. This introduces a new capability to view syndicated content with associated outline attributes directly in a browser.

projects/syndications/syndication-2 · high confidence

New Request Headers diagnostic endpoint

A new lightweight web application has been added to the request-headers project that displays all incoming HTTP request headers. When accessed, the service returns an HTML page listing each header key and its corresponding value, providing a simple way to inspect client request data.

projects/request/request-headers · high confidence

New Request samples documentation and build scripts

Added a new README.md for the Request project section, documenting samples for capturing input and examining web requests, including anti-forgery tokens, HTTP verbs, headers, query strings, forms, and cookies. Included build scripts (build.bat and build.sh) to compile the associated sample projects.

projects/request · high confidence

New SignalR and TLS channel-binding sample projects for .NET 11

Added three new sample applications in the .NET 11 project directory: \signalr-auth-refresh\ demonstrates SignalR's new ability to refresh authentication tokens without dropping the connection; \signalr-client-cancellation\ shows how a client can cancel a server-side hub method invocation using a \CancellationToken\; and \tls-channel-binding\ exposes TLS channel-binding tokens via \ITlsConnectionFeature\ to help defend against relay attacks.

projects/net11/signalr-auth-refresh, projects/net11/signalr-client-cancellation, projects/net11/tls-channel-binding · high confidence

New System.Text.Json sample application

A new sample project has been added to demonstrate the System.Text.Json library. It includes a minimal Web API that serializes a Person object to JSON and a README explaining how to use JsonSerializer.SerializeAsync for streaming serialization.

projects/json/json · high confidence

New URI Helper Display URL demo application

A new standalone web application has been added to demonstrate the \GetDisplayUrl\ helper method from \Microsoft.AspNetCore.Http.Extensions\. This tool renders the combined components of the request URL in a fully un-escaped form suitable for display, allowing users to test how various URL structures (including query parameters and special characters) are processed by the framework.

projects/uri-helper/uri-helper-get-display-url · high confidence

New URL rewriting demo application added

A new ASP.NET Core application has been added to the rewrite-3 project that demonstrates URL rewriting capabilities. The app captures URL paths ending with file extensions (like .html or .aspx) and extracts them into query parameters 'path' and 'ext', displaying the results on a simple HTML page.

projects/rewrite/rewrite-3 · high confidence

New WebSocket echo and broadcast sample application

A new sample application has been added to the web-sockets-3 project that demonstrates real-time communication using WebSockets. The application serves an HTML page where users can connect via multiple browser tabs to send messages. It implements an echo feature that replies to the sender and a broadcast feature that sends the message to all other connected clients. The server-side logic manages active connections using a concurrent dictionary and handles message reception and transmission asynchronously.

projects/web-sockets/web-sockets-3 · high confidence

New XML validation sample application

Added a new ASP.NET Core sample application under \projects/xml/xml-validation\ that demonstrates how to validate XML documents against XSD schemas. The application provides a web interface where users can input both an XML Schema and an XML Document, then submit them to check for validity, displaying specific error messages for schema or document issues via success and danger alert components.

projects/xml · high confidence

New application-environment sample project

A new sample project has been added to demonstrate how to retrieve application environment details, including the target framework, version, and base path. The project uses a minimal API to expose this information via HTTP and includes a solution file, a README, and VS Code settings with a custom color theme.

projects/application-environment · high confidence

New authentication samples for JWT, Cookies, Mixed, OpenAPI, and Identity API

The authentication project now includes five distinct samples demonstrating different ASP.NET Core authentication patterns. authentication-1 shows simplified JWT Bearer token authentication, while authentication-2 demonstrates cookie-based authentication. authentication-3 combines both JWT and Cookie schemes in a single application. authentication-4 updates the WebAPI template to use .NET 10's built-in OpenAPI support (replacing Swashbuckle) with JWT Bearer authentication and the Scalar UI for API documentation. Finally, authentication-5 introduces the new Identity API endpoints for user registration and login, backed by Entity Framework Core with SQLite.

projects/authentication · high confidence

New build, restore, and clean automation scripts for samples

The \projects\ directory now includes \build.bat\, \build.sh\, \clean.bat\, \clean.sh\, \restore.bat\, and \restore.sh\ to streamline managing the sample applications. These scripts automate the \dotnet build\, \dotnet clean\, and \dotnet restore\ commands for the various sample folders. The build scripts feature a dynamic section that automatically discovers and builds subfolders containing their own build scripts, reducing manual maintenance, while also explicitly listing specific samples to ensure comprehensive coverage. This change simplifies the workflow for verifying that the samples compile and restore correctly across the repository.

projects · high confidence

New connection-info service to display endpoint details

A new service has been added that exposes the local and remote IP addresses and ports, along with the client certificate friendly name, via a simple HTTP endpoint. This allows users to inspect the connection details of incoming requests directly.

projects/connection-info · high confidence

New demo for SSR client-side form validation

A new sample application has been added to demonstrate server-side rendered (SSR) Blazor forms with client-side validation. The project showcases how \DataAnnotationsValidator\ rules are rendered by the server and enforced by Blazor's JavaScript in the browser, providing instant feedback without server round-trips. It includes a registration form that validates email and password fields using CSS classes (\valid\, \invalid\, \modified\) and utilizes \EditContext.ValidateAsync()\ for submission logic.

projects/net11/ssr-client-side-validation · high confidence

New examples for HTTP response headers and trailing headers

Added demonstration projects for adding HTTP response headers (including handling errors when modifying headers after the body is sent) and issuing trailing HTTP headers after the response body is written. The trailing headers example uses Kestrel with HTTP/1.1 and HTTP/2 support to show how to declare and append trailers like Server-Timing.

projects/response · high confidence

New feature sample for inspecting and modifying max request body size

Added a new sample application demonstrating the use of the IHttpMaxRequestBodySizeFeature. This sample shows how to configure the maximum request body size at the Kestrel server level and how to inspect or modify the limit for individual requests within the application pipeline.

projects/features/features-max-request-body-size · high confidence

New file upload capability in the request form service

The projects/request/form-upload-file component now provides a web interface for uploading files. Users can access the root path to view an HTML form that accepts a single file via POST to the /Upload endpoint. Upon submission, the uploaded file is saved to the server's content root directory, and the user receives a confirmation message indicating the file's saved location.

projects/request/form-upload-file · high confidence

New form-values endpoint for testing HTTP form submissions

A new Program.cs file has been added to the projects/request/form-values directory, introducing a minimal ASP.NET web application. This service provides a GET endpoint that renders an HTML form collecting various input types (text, password, textarea, select, multi-select, checkboxes, and hidden fields) and a POST endpoint at /Upload that reads the submitted form data and displays the key-value pairs back to the user. This appears to be a utility or test endpoint for verifying form value parsing behavior.

projects/request/form-values · high confidence

New gRPC JSON Transcoding samples for GET, POST, PUT, and PATCH

Added new sample projects (grpc-13 through grpc-17) in the \projects/grpc\ directory that demonstrate gRPC JSON transcoding using ASP.NET Core. These samples show how to map gRPC services to HTTP REST endpoints, covering GET requests with route parameters, POST requests with JSON bodies, PUT requests combining route parameters and bodies, and PATCH requests for partial updates. Each sample includes the necessary \.proto\ definitions, C\# service implementations, and HTML/JavaScript front-ends to interact with the transcoded endpoints.

(repo-wide) · high confidence

New gRPC sample demonstrating map values in Protocol Buffers

Added a new sample project that demonstrates how to define and use Protocol Buffers map types (dictionaries) for sending structured data over gRPC. The sample includes a client and server implementation where the client sends a request containing a map of capabilities (superpowers with names and levels), and the server processes and returns the aggregated data.

projects/grpc/grpc-7 · high confidence

New health check endpoint routing sample

Added a new sample project demonstrating how to configure health checks using the endpoint routing API (MapHealthChecks) in ASP.NET Core, replacing the legacy UseHealthChecks middleware approach. The sample includes a minimal WebApplication setup that exposes a health check at /WhatsUp and a root page linking to it, along with VS Code launch and task configurations for debugging and building.

projects/endpoint-routing/new-routing-21 · high confidence

New htmx modal sample using Pico CSS

Added a new sample project that demonstrates opening a native HTML \<dialog\> modal via htmx, styled with Pico CSS instead of Bootstrap. The sample uses htmx version 4.0.0 and includes a minimal ASP.NET Core application that serves the modal content and handles the htmx swap event to display the dialog.

projects/htmx/modal-bootstrap · high confidence

New logging examples for static loggers and Grafana Loki integration

The logging project now includes two new samples: one demonstrating how to create cached static loggers for performance, and another showing how to send logs to Grafana Loki using a Docker Compose setup with Loki and Grafana OSS.

projects/logging · high confidence

New middleware demonstration application added

A new console application has been added to demonstrate ASP.NET Core middleware ordering and execution flow. The application defines two middleware components: the first sets a 'Greeting' item and writes both the greeting and a 'Goodbye' item to the response, while the second middleware sets the 'Goodbye' item. This serves as a practical example of how middleware components interact and the importance of execution order when writing to the HTTP response.

projects/middleware/middleware-1 · high confidence

New middleware execution order demonstration

A new Program.cs file has been added to the middleware-0 project that demonstrates the specific execution order of ASP.NET Core middleware. The code defines a pipeline with two custom middleware components and a final request handler, logging execution steps (1 through 5) to show how requests pass through the pipeline and how responses are constructed.

projects/middleware/middleware-0 · high confidence

New middleware sample application for .NET 6

A new sample application has been added to the middleware-6 project directory, demonstrating .NET 6 minimal hosting patterns. The application implements a middleware pipeline using MapWhen to conditionally handle requests containing '/hello', nesting a Map handler for '/world' within it, and providing a default response with links to the tested endpoints.

projects/middleware/middleware-6 · high confidence

New middleware-4 sample application with minimal API endpoints

A new sample application has been added at projects/middleware/middleware-4 that demonstrates a minimal .NET web app. It exposes two specific routes, /hello and /world, which return simple text responses, and provides a default landing page containing links to these two endpoints.

projects/middleware/middleware-4 · high confidence

New multi-tenant shell settings dashboard page

A new Index.cshtml page has been added to the multi-tenant sample host, providing a user-facing dashboard that displays current shell settings. This page lists links to the root, customer-a, and customer-b tenants, and presents a table showing the Name, State, RequestUrlPrefix, and custom settings (CustomSetting, CustomerLevel) for the active tenant shell.

projects/orchard-core/multi-tenant/Host/Pages · high confidence

New password hashing test endpoint

A new ASP.NET Core application has been added to the password-hasher project that exposes a simple HTTP endpoint for testing password hashing. Users can now send a password via a query parameter (e.g., ?password=secret) to receive the hashed result and a verification status, with a default password of '123456789' used if none is provided.

projects/password-hasher · high confidence

New query-string-2 demo app for handling multiple query string values

A new demo application has been added at projects/request/query-string-2 that demonstrates how to read and display multiple values for a single query string parameter in a .NET web app. The app serves an HTML page with a link that appends multiple 'message' parameters (e.g., ?message=hello&message=world&message=again) and iterates through the collected values to display them in a list.

projects/request/query-string-2 · high confidence

New sample app for HTTP header constants

Added a new .NET 6 sample application that demonstrates the usage of the \Microsoft.Net.Http.Headers.HeaderNames\ class. The app runs a web server that lists all available HTTP header constants, illustrating how to use strongly-typed constants like \HeaderNames.ContentType\ instead of string literals.

projects/request/request-headers-names · high confidence

New sample demonstrating HTTP QUERY method with request body and output caching

A new sample project has been added that demonstrates the use of the HTTP QUERY method, a safe and idempotent method that supports a request body. The sample implements a search endpoint using \MapMethods\ with the QUERY verb, leveraging \CacheOutput()\ to take advantage of the method's safe classification. It includes a client-side JavaScript interface to issue QUERY requests, illustrating how to handle structured search queries that exceed URL length limits, while noting that standard HTML forms cannot send this method.

projects/net11/query-method · high confidence

New sample demonstrating HX-Trigger with multiple custom events

Added a new .NET sample project that demonstrates how to use the HX-Trigger response header to emit multiple custom events (show-me, show-you) from the server. The sample includes a client-side script that listens for these events and displays alerts, along with anti-forgery token handling for non-GET requests.

projects/htmx/header-hx-trigger-3 · high confidence

New sample demonstrating Razor Pages-only endpoint routing

A new sample project has been added to the endpoint-routing directory that demonstrates how to configure an application to use only Razor Pages routing. The sample uses the minimal hosting model (Program.cs) to register Razor Pages services and map them via \app.MapRazorPages()\, explicitly noting that MVC Controllers are not supported in this configuration.

projects/endpoint-routing/new-routing · high confidence

New sample demonstrating \[SupplyParameterFromTempData\] for Blazor SSR

A new sample application has been added to showcase the \\[SupplyParameterFromTempData\]\ attribute in Blazor Server-Side Rendering (SSR). This feature allows component properties to read and write TempData values directly, enabling status messages (like 'Your changes were saved') to persist across redirect-after-post scenarios. The sample configures the application to use a session-storage temp data provider to ensure compatibility with redirects and demonstrates the attribute alongside existing ones like \\[SupplyParameterFromForm\]\.

projects/net11/supply-parameter-from-temp-data · high confidence

New sample demonstrating all HTTP verbs with HTMX 4 and antiforgery

Added a new sample application that demonstrates how to handle GET, POST, PUT, PATCH, and DELETE requests using HTMX 4. The sample integrates ASP.NET Core's antiforgery protection, automatically attaching tokens to non-GET requests via an endpoint filter and client-side configuration, and uses Pico CSS for styling.

projects/htmx/all-verbs · high confidence

New sample demonstrating htmx:config:request event usage

Added a new .NET sample application that demonstrates how to use the htmx \htmx:config:request\ event to inject parameters (such as a 'Name' field) and handle anti-forgery tokens into HTTP requests. The sample includes a web server that validates these tokens and responds to GET, POST, PUT, PATCH, and DELETE requests, along with the necessary VS Code settings and solution files to run the example.

projects/htmx/htmx-config-request · high confidence

New sample demonstrating htmx:response:error handling

Added a new sample application that demonstrates how to listen to the \htmx:response:error\ event to capture and display HTTP error messages from the server. The sample includes a .NET backend that intentionally returns 400 Bad Request responses for various HTTP methods (GET, POST, PUT, PATCH, DELETE) when the \HX-Request\ header is missing, and a frontend that alerts the user with the specific HTTP status code and error message upon receiving these errors.

projects/htmx/htmx-response-error · high confidence

New sample demonstrating hx-on event handling in HTMX 4

A new sample project has been added to demonstrate using the \hx-on\ attribute to handle HTMX events, specifically \htmx:before:request\ and \htmx:after:request\. The example showcases how to attach custom logic (such as alerts or anti-forgery token injection) to list items triggering various HTTP verbs (GET, POST, PUT, PATCH, DELETE) via HTMX 4. It includes a complete ASP.NET Core backend setup with antiforgery validation and a VS Code settings file for consistent development environment styling.

projects/htmx/hx-on-2 · high confidence

New sample demonstrating hx-replace-url with custom URLs and anti-forgery

Added a new ASP.NET Core sample application that demonstrates the \hx-replace-url\ attribute, specifically showing how to replace the browser URL with a custom value (e.g., \/person/anna\) rather than the request URL. The sample includes interactive links for GET, POST, PUT, PATCH, and DELETE methods, and integrates HTMX 4.0.0 with automatic anti-forgery token handling for non-GET requests.

projects/htmx/hx-replace-url-2 · high confidence

New sample demonstrating multiple Blazor Server entry points

A new sample application has been added to demonstrate how to configure multiple Razor Pages endpoints (such as /Admin/Blazor, /Manage, and /Secure) to serve as distinct starting points for Server-Side Blazor components. The sample includes the necessary Razor Pages, Blazor components, and Program.cs configuration to render Blazor content from different routes, utilizing Bootstrap 5 for styling.

projects/blazor-ss/StartingVariation · high confidence

New sample for hosting Kestrel in a Windows Service

Added a new sample project (windows-service-1) demonstrating how to host a Kestrel web server within a Windows Service using Microsoft.Extensions.Hosting.WindowsServices. The sample configures the application to run on http://localhost:5300 and includes documentation on installing and managing the service via the Windows Service Control Manager.

projects/windows-service · high confidence

New sample for serving static files from multiple folders

A new sample application demonstrates how to serve static files from multiple directories, including those outside the default wwwroot folder. The example configures a secondary PhysicalFileProvider mapped to a specific request path, allowing users to access assets from separate locations within a single application.

projects/file-provider/serve-static-files-7 · high confidence

New server address feature endpoint

A new application entry point (Program.cs) has been added to the features-server-addresses project. This application creates a web server that retrieves the list of bound server addresses via the IServerAddressesFeature and exposes them as plain text in the HTTP response body.

projects/features/features-server-addresses · high confidence

New server request feature demonstration

A new demonstration application has been added to the features-server-request location, showcasing how to modify HTTP request headers using the ASP.NET Core Http.Features API. The app intercepts incoming requests to append a 'greetings' header and returns the value in the response.

projects/features/features-server-request · high confidence

New static file serving sample using minimal APIs

A new sample project has been added that demonstrates serving static files using .NET 6 minimal APIs. The application configures a file server with directory browsing enabled, and includes sample assets such as a CSS file, an HTML page, and a text file within the wwwroot directory to illustrate the feature.

projects/file-provider/serve-static-files-3 · high confidence

New static file serving sample using minimal hosting model

A new sample project has been added to serve static files and enable directory browsing using the .NET minimal hosting model (WebApplication.Create). The application exposes a simple HTML page and CSS file from the wwwroot directory, while also including a 'secrets' subfolder to demonstrate file access patterns.

projects/file-provider/serve-static-files-2 · high confidence

New static file serving sample with custom directory browser

A new sample application has been added to serve static files, featuring a custom directory browser that displays folder contents using a Bootstrap-styled HTML layout. The application includes a custom formatter that renders directories as links, images as thumbnails, and other files as standard links, along with a sample CSS file and an index page in the wwwroot folder.

projects/file-provider/serve-static-files-4, projects/file-provider/serve-static-files-5 · high confidence

New utility app to browse System.Net.Mime.MediaTypeNames constants

A new .NET web application has been added to the utils folder that serves an HTML page listing the available constants in System.Net.Mime.MediaTypeNames (Application, Text, and Image categories). This provides a convenient, browsable reference for common MIME type constants, addressing the note that while the class is not extensive, values like Text.Html and Application.Json are frequently useful.

projects/utils/media-type-names · high confidence

New utility to compare ASP.NET Core HTTP status code constants

A new utility application has been added to the \projects/utils/http-status-codes\ folder. It provides a web-based comparison between \Microsoft.AspNetCore.Http.StatusCodes\ and \System.Net.HttpStatusCode\, displaying their respective constant names and integer values side-by-side in a table to help users understand the differences between the two approaches.

projects/utils/http-status-codes · high confidence

OpenAPI support for binary file responses

The application now generates OpenAPI documents that correctly map file result types (such as FileContentHttpResult) to the OpenAPI schema format of type: string, format: binary. This allows API consumers to accurately understand and handle binary file downloads, such as the PDF sample provided in the demo endpoint.

projects/net11/open-api-14 · high confidence

Redis caching sample application added

A new .NET sample application demonstrating Redis-based session management has been added to the project. The application configures a Redis connection via \appSettings.json\, registers \StackExchangeRedisCache\ and session services in the dependency injection container, and implements middleware to store and retrieve session data (including strings, integers, and serialized objects) during HTTP requests.

projects/caching/redis-cache, projects/configurations/configuration-options · high confidence

Sample demonstrates accessing MVC attribute metadata via middleware

This sample project illustrates how to retrieve custom attribute data (specifically a \MessageAttribute\) from an MVC controller action within a custom middleware (\GreeterMiddleware\) using the Endpoint metadata system. The application uses the .NET 6 minimal hosting model, where the middleware reads the attribute content and stores it in the HTTP context items for the view to display.

projects/endpoint-routing/new-routing-13 · high confidence

Sample demonstrates accessing Razor Page attribute metadata via middleware

This sample project shows how to retrieve values from custom attributes (like MessageAttribute) applied to Razor Pages by using the new Endpoint metadata API within a middleware component. The GreeterMiddleware reads the attribute content and stores it in HttpContext.Items, making it available to the Razor Page view for display.

projects/endpoint-routing/new-routing-11 · high confidence

Sample demonstrating Blazor circuit pause capabilities

A new sample application in projects/net11/circuit-pause illustrates two circuit-pause features for Blazor Server: server-initiated pause via Circuit.RequestCircuitPauseAsync (triggered by a /pause-all endpoint) and automatic opt-in pause when a tab is hidden for 30 seconds. The sample includes a CircuitTracker to manage active circuits and an interactive counter page to demonstrate pause/resume behavior.

projects/net11/circuit-pause · high confidence

Added a new sample project that demonstrates how to implement cross-site antiforgery by accessing cookies from a remote API. The solution consists of a backend API running on port 5001 and a frontend Razor Pages application on port 5002. The API configures a CORS policy allowing credentials from the frontend's origin, and exposes an endpoint that sets a cookie. The frontend includes JavaScript to fetch data from the API with credentials included, allowing it to read the cookie set by the cross-origin API.

projects/request/cookies-3 · high confidence

Sample demonstrating custom URL-based culture provider

This location introduces a sample MVC application that implements a \CustomRequestCultureProvider\ to determine the user's locale based on the first segment of the URL path (e.g., \/en\, \/fr\). The sample includes the necessary resource files for English and French translations and a view that displays localized content, illustrating how to configure supported cultures and a default fallback in an ASP.NET Core application.

projects/mvc/localization/mvc-localization-10 · high confidence

Sample demonstrating endpoint inspection in middleware

This location introduces a new sample application that demonstrates how to inspect the current endpoint within a custom middleware using the \HttpContext.GetEndpoint()\ extension method. The application includes a \GreeterMiddleware\ that checks the endpoint's display name (specifically for the \/about\ page) and injects a greeting into the request context, which is then rendered in the Razor Pages. The sample is built on .NET 6 and includes the necessary VS Code configuration files for debugging and building.

projects/endpoint-routing/new-routing-10 · high confidence

Sample demonstrating method-aware endpoint metadata in Razor Pages

This location adds a new sample project that demonstrates how to access endpoint metadata from a custom middleware in ASP.NET Core Razor Pages. Unlike MVC, where attributes can be placed on methods, Razor Pages require attributes on the PageModel class; this sample shows how to use a custom \MessageAttribute\ to provide different content for GET and POST requests, which is then read by a \GreeterMiddleware\ and injected into the page context.

projects/endpoint-routing/new-routing-12 · high confidence

Support for multiple Produces per status code in OpenAPI

The OpenAPI integration now allows endpoints to declare multiple Produces\<T\> attributes for the same HTTP status code. When an endpoint specifies different content types (such as text/plain and application/json), the generated OpenAPI document correctly emits separate content entries for each media type, ensuring accurate API documentation for clients consuming different formats.

projects/net11/open-api-15 · high confidence

Terminal middleware sample added to middleware-3

A new Program.cs file has been added to the middleware-3 project, demonstrating a terminal ASP.NET Core middleware. This sample implements a middleware class that writes "Hello world" directly to the response without invoking the next delegate, serving as a reference for creating terminal middleware components.

projects/middleware/middleware-3 · high confidence

Behavioural changes

Add .NET 6 memory caching sample with file-based expiration

The caching-2 project now uses the .NET 6 minimal hosting model, replacing the previous startup class with a Program.cs that configures an IMemoryCache and a PhysicalFileProvider. The sample demonstrates caching a greeting string and automatically expiring the cache entry when a specific file (cache-file.txt) is modified, providing a concrete example of file-dependency-based cache expiration in .NET 6.

projects/caching/caching-2 · high confidence

Add .NET 6 minimal API routing sample

The project now uses the .NET 6 minimal hosting model (Program.cs) instead of the previous Startup-based configuration. It demonstrates attribute routing on a controller with multiple routes (/, /home, /home/index) returning a simple HTML page, and includes VS Code launch and build task configurations to support this setup.

projects/mvc/routing/routing-3 · high confidence

Add .NET 6 minimal-hosting Tag Helper sample

The tag-helper-1 sample project has been updated to use the .NET 6 minimal hosting model (Program.cs) instead of the previous startup pattern. It demonstrates a custom HelloWorld tag helper that replaces an \<helloworld\> element with a div, rendered via the Index view which includes Bootstrap 5.1.3.

projects/mvc/tag-helper/tag-helper-1 · high confidence

Added build scripts and updated documentation for caching samples

Added build.bat and build.sh scripts to automate building the individual caching sample projects (caching-1 through caching-4 and redis-cache). Updated the README to include a link to the Redis caching sample and corrected the framework version reference to dotnet8.

projects/caching · high confidence

Added trailing-slash redirect behavior to the rewrite service

The rewrite-1 project now includes a new Program.cs that implements a URL rewriting rule to redirect requests ending with a trailing slash (e.g., /hello-world/) to the root path (/). This change introduces a specific behavioral change where any path ending in '/' is automatically redirected, ensuring consistent URL formatting for users accessing these endpoints.

projects/rewrite/rewrite-1 · high confidence

Blazor Server localization sample with PO file support and Bootstrap 5

The Localization-3 sample now demonstrates how to organize Portable Object (PO) files using a custom \ILocalizationFileLocationProvider\ (via OrchardCore.Localization.Core) and supports language switching via cookies. The UI has been updated to use Bootstrap 5, and the application is configured for Blazor Server with support for French and English cultures.

projects/blazor-ss/Localization-3 · high confidence

Dependency injection samples migrated to .NET 6 with Keyed Services support

The dependency injection samples have been updated to target .NET 6, introducing new examples for Keyed Services in both Minimal API and MVC contexts. Users can now see how to register and retrieve services using string keys via \IServiceProvider.GetRequiredKeyedService\<T\>(key)\. The collection also includes updated demonstrations for basic DI lifetimes, \IServiceProvider\ usage, automatic registration via \IBootstrap\, and Lazy type registration.

projects/dependency-injection · high confidence

Diagnostics-1 project now uses a minimal .NET 6 web server

The diagnostics-1 project has been restructured to use a minimal hosting model in .NET 6. The entry point now creates a WebApplication instance, enables the default welcome page, and runs the server, replacing the previous project structure.

projects/diagnostics/diagnostics-1 · high confidence

Diagnostics-5 now uses minimal API hosting

The diagnostics-5 project has been refactored to use the .NET 6 minimal hosting model. The application now explicitly handles HTTP 500 errors by redirecting to a custom /error endpoint, which displays the specific status code in the response body, replacing the previous implementation.

projects/diagnostics/diagnostics-5 · high confidence

Empty CSS files added to Blazor Server sample projects

Empty site.css files have been added to the wwwroot/css directories of the ChatR, HelloWorld, JsIntegration, and Layout Blazor Server sample projects. This change ensures that each sample project has a dedicated stylesheet placeholder, likely to support future styling or to align with the project structure implied by the commit message regarding reorganization.

(repo-wide) · medium confidence

Endpoint Routing sample project now uses minimal hosting model

The endpoint-routing sample application has been updated to use the .NET 6 minimal hosting model. The project now initializes the web host and configures controller routing using a concise Program.cs script with \WebApplication.CreateBuilder\ and \MapDefaultControllerRoute\, replacing the previous explicit startup configuration.

projects/endpoint-routing/endpoint-routing · high confidence

Endpoint filters now observe parameter-binding failures

The endpoint filter pipeline now executes even when route or query parameter binding fails (resulting in a 400 status), allowing filters to intercept and customize the error response. Previously, binding failures could short-circuit the pipeline or throw exceptions in development, preventing filters from running. This change enables filters to detect \StatusCode == 400\ and return custom problem details, though JSON body deserialization failures still short-circuit before filters run.

projects/net11/endpoint-filter-binding-failures · high confidence

Extension-based image redirection to /images/jpeg

The application now automatically redirects requests for .jpg files to the /images/jpeg path using a 301 Moved Permanently response. This behavior is implemented via a custom rewrite rule in Program.cs that checks the request path, prevents infinite redirect loops by skipping paths already under /images/jpeg, and serves a static HTML page demonstrating the redirection with an embedded image.

projects/rewrite/rewrite-6 · high confidence

Introduce .NET 6 middleware sample with DI integration

The project has been migrated to .NET 6, replacing the previous source structure with a new Program.cs that demonstrates a custom TerminalMiddleware. This middleware integrates with the built-in dependency injection container by consuming Greeting and Goodbye services, illustrating how to inject dependencies into middleware components in the modern .NET hosting model.

projects/middleware/middleware-9 · high confidence

Introduce .NET 6 minimal API for MVC localization

The project has been upgraded to .NET 6 and rewritten using the minimal hosting model. The new Program.cs configures MVC localization by registering the localization services and setting French (fr-FR) as the default and supported culture. A new launch configuration has been added to support debugging this .NET 6 application in VS Code, and the resource file has been updated to use the full type path (MvcLocalization.HomeController) to align with the project's namespace structure.

projects/mvc/localization/mvc-localization-1 · high confidence

Introduce minimal API structure for POP3 email retrieval

The application now uses a minimal API entry point in Program.cs to configure the web host, register the EmailService for retrieving emails via POP3, and map the default controller route. The EmailService implementation connects to a POP3 server on port 995 with auto-SSL, authenticates, and fetches up to 10 emails by default (configurable), extracting sender details, subject, and content. The UI provides a 'Retrieve' button that triggers the /Mailkit/Retrieve endpoint, which fetches 50 emails and redirects back to the Index view.

projects/mailkit/mailkit-2 · high confidence

MVC localization sample now uses .NET 6 minimal hosting and explicit culture providers

The MVC localization sample in projects/mvc/localization/mvc-localization-6 has been updated to .NET 6, replacing the previous startup pattern with a minimal hosting model in Program.cs. The application now explicitly configures request localization to support French (fr-FR) and English (en-US), sets French as the default culture, and restricts culture detection to query string and cookie providers (removing the default Accept-Language header provider). Resource files for English and French are included, and the home view displays the requested culture along with localized strings for "Hello", "Goodbye", "Yes", and "No".

projects/mvc/localization/mvc-localization-6 · high confidence

MVC localization sample now uses minimal hosting model with French resource support

The mvc-localization-3 project has been restructured to use the .NET 6 minimal hosting model (Program.cs) instead of the previous Startup/Program pattern. It configures ASP.NET Core MVC with shared localization resources, defaulting to the French (fr-FR) culture, and includes a French resource file (Global.fr.resx) with translations for 'Hello', 'Goodbye', 'Yes', and 'No'. The sample also adds VS Code launch and task configurations for debugging and building the project.

projects/mvc/localization/mvc-localization-3 · high confidence

MVC localization sample now uses shared resources and .NET 6 minimal hosting

The MVC localization sample in this location has been reorganized to demonstrate localization using shared resources (ResX files) injected via IStringLocalizer into controllers, rather than page-specific resources. The application now targets .NET 6, utilizing the minimal hosting model (Program.cs) and configuring request localization to support French (fr-FR) as the default culture. Additionally, VS Code launch and task configurations have been added to support building and debugging the .NET 6 project.

projects/mvc/localization/mvc-localization-7 · high confidence

MVC samples updated for .NET 10 and new dependency inference behavior

The MVC sample project has been reorganized and updated to target .NET 10, introducing new documentation and code examples for several features. A key behavioral change is demonstrated in the 'Infer dependency from action parameter' sample, which shows that the \\[FromServices\]\ attribute is no longer required for injecting services into action methods, though this can be disabled via \ApiBehaviorOptions\. The collection also adds samples for using \Newtonsoft.Json\ as the JSON serializer, returning XML responses, and generating API documentation with NSwag (noting the shift to built-in OpenAPI). Build scripts (\build.bat\ and \build.sh\) have been added to streamline building the various sample sub-projects.

projects/mvc · high confidence

Migrate Blazor Server app to .NET 6 and Bootstrap 5

The ChatR Blazor Server application has been upgraded to .NET 6, requiring the use of the new \@code\ block syntax instead of the deprecated \@functions\ directive. Additionally, the UI styling has been updated to Bootstrap 5, as evidenced by the new CDN link in the \Index.cshtml\ layout file. The page structure now utilizes \Html.RenderComponentAsync\ for server-side prerendering, aligning with modern Blazor Server patterns.

projects/blazor-ss/ChatR/Pages · high confidence

Migrate Razor Pages Basic sample to .NET 6 minimal hosting model

The Razor Pages Basic sample has been updated to use the .NET 6 minimal hosting model, replacing the traditional startup/configuration pattern with a concise Program.cs entry point. The application now features a modernized UI using Bootstrap 5.1.3 and demonstrates both inline and separate code-behind page models, providing a current reference implementation for Razor Pages development.

projects/razor-pages/razor-pages-basic · high confidence

Migrate to .NET 10 built-in OpenAPI and Scalar

The NSwag MVC sample has been updated to use .NET 10's native OpenAPI support, replacing the previous NSwag.AspNetCore dependency. This change introduces the Scalar API reference UI for documentation and updates the application's startup configuration to use the built-in OpenAPI middleware.

projects/mvc/nswag · high confidence

Migrate to .NET 10 built-in OpenAPI with Scalar UI

The nswag-2 sample has been updated to use ASP.NET Core 10's native OpenAPI support, removing the external NSwag dependencies. This change replaces the previous Swagger UI with the modern Scalar UI for interactive API documentation and updates the codebase to use standard .NET attributes like \[Tags\] and \[ApiExplorerSettings\] instead of NSwag-specific ones, while maintaining the same API endpoints and behavior.

projects/mvc/nswag-2 · high confidence

Minimal API Pokedex sample now uses .NET 10 OpenAPI and Scalar

The Minimal API Pokedex sample has been updated to use the .NET 10 built-in OpenAPI generation (\AddOpenApi\ and \MapOpenApi\) instead of the previous Swagger setup, and now integrates the Scalar API reference UI (\MapScalarApiReference\) for interactive documentation. This change simplifies the API discovery experience by leveraging modern, built-in .NET tooling while maintaining the existing Pokedex endpoints and data access logic.

projects/mini/minimal-api-pokedex · high confidence

Minimal API samples updated to .NET 10 built-in OpenAPI and expanded with antiforgery and endpoint filter demos

The minimal-api samples have been migrated to use .NET 10's built-in OpenAPI support (replacing external packages like Swashbuckle) and now include new demonstrations for antiforgery tokens (HTML forms, AJAX, and cross-site scenarios) and endpoint filters (including sequence handling and status code detection).

projects/minimal-api · high confidence

Orleans 8.0 sample with Redis persistence

The orleans-2 sample project has been upgraded to Orleans 8.0 and now uses Redis as its grain storage provider. The application configures a localhost clustering setup and persists greeting data to a Redis server running on localhost:6379, allowing users to see state survive application restarts. A new VS Code settings file applies a custom purple color theme to the workspace.

projects/orleans/orleans-2 · high confidence

Orleans samples updated to version 10 with new documentation and build scripts

The Orleans samples have been upgraded to support Microsoft Orleans version 10, introducing new examples for minimal API configuration, Redis persistence, Timers, Reminders, and Stateless Worker grains. The previous sample set has been replaced, and a new README documents the available samples. Additionally, cross-platform build scripts (build.sh and build.bat) have been added to facilitate building the sample projects.

projects/orleans · high confidence

RTL/LTR support for Blazor Server localization

The Localization-4 sample now supports Right-to-Left (RTL) and Left-to-Right (LTR) text direction. The Razor Pages layout dynamically sets the HTML direction based on the selected culture (e.g., 'rtl' for Arabic), and the application allows users to switch between English and Arabic, which updates the localized content and the page layout direction accordingly.

projects/blazor-ss/Localization-4 · high confidence

Simplified background service implementation using BackgroundService

The ihosted-service-1 sample has been refactored to use the built-in BackgroundService base class instead of a custom IHostedService implementation. This change reduces boilerplate code, simplifies cancellation token handling, and aligns with Microsoft's recommended pattern for background tasks in ASP.NET Core. Users will see cleaner, more maintainable code while maintaining the same functionality of updating a Greeter counter every second in the background.

projects/ihosted-service/ihosted-service-1 · high confidence

Updated HTMX sample to version 4 with self-updating element example

The trigger-load-2 sample has been updated to use HTMX version 4.0.0, demonstrating a self-updating element pattern where a div triggers a GET request on load with a 1-second delay and swaps the response using outerHTML. The example now includes a VS Code settings file with custom color themes and a solution file for the .NET project, providing a complete, runnable demonstration of this polling behavior.

projects/htmx/trigger-load-2 · high confidence

Updated HTMX swap sample to version 4

The HTMX hx-swap demonstration has been upgraded to use HTMX version 4.0.0, loading the library from the jsDelivr CDN. The sample application now includes a complete set of interactive examples covering all swap options (innerHTML, outerHTML, textContent, beforebegin, afterbegin, beforeend, afterend, delete, and none), allowing users to observe how different swap behaviors affect the DOM and event handling.

projects/htmx/swap · high confidence

Updated JSON serialization sample to use .NET 6 minimal APIs

The JSON serialization sample in this location has been updated to target .NET 6 and utilize the minimal APIs hosting model. The application now demonstrates \System.Text.Json\ configuration options—such as camelCase naming, indented output, and ignoring null values—within a modern, concise endpoint structure.

projects/json/json-2 · high confidence

Updated Orleans reminder sample to use modern .NET and Redis storage

The Orleans reminder sample has been updated to use the modern .NET WebApplication builder and includes explicit configuration for Redis grain storage. The application now uses \UseLocalhostClustering\ with an in-memory reminder service backed by Redis for persistent state, and the UI has been simplified to demonstrate setting and removing reminders via HTTP endpoints. The sample also includes a VS Code settings file with a custom color theme.

projects/orleans/reminder · high confidence

Updated Orleans samples to use modern grain patterns and storage providers

The Orleans samples in projects/orleans/orleans-1 and projects/orleans/orleans-4 have been updated to align with recent Orleans versions (referenced as 7+ and 10 in documentation). Key behavioral changes include grains now implementing the IGrain interface instead of inheriting from the Grain class (POCO grains), and the adoption of the new serializer using \[GenerateSerializer\] and \[Id\] attributes. The orleans-1 sample demonstrates basic clustering with memory storage, while orleans-4 introduces Redis-based persistent state and reminder services, requiring a running Redis instance. The orleans-4 sample also utilizes C\# records for data models.

projects/orleans/orleans-1, projects/orleans/orleans-4 · high confidence

Updated View Component samples to use .NET 6 minimal hosting

The View Component samples in this directory have been upgraded to target .NET 6, replacing the previous ASP.NET Core project structure with the new minimal hosting model (using \WebApplication.CreateBuilder\ and \MapDefaultControllerRoute\). The samples now demonstrate four distinct patterns: invoking a component via the controller, using the Tag Helper syntax, returning a component result directly from a controller, and passing complex objects as parameters.

projects/mvc/view-component · high confidence

Updated caching example to demonstrate shared expiration via cancellation tokens

The caching-4 example now uses .NET 6 syntax and demonstrates how multiple cache entries can share a single expiration mechanism. By registering a post-eviction callback and using a shared CancellationChangeToken, both cache keys expire simultaneously after a set number of page refreshes, addressing the previous issue where the counter did not match the actual refresh count.

projects/caching/caching-4 · high confidence

Updated endpoint routing samples to ASP.NET Core 3.1

The endpoint routing samples have been upgraded to target ASP.NET Core 3.1, introducing the new \app.UseEndpoints\ middleware pipeline. This change replaces the older \UseMvc\ approach with more granular control over endpoint mapping, supporting features such as direct \RequestDelegate\ usage via \MapGet\/\MapPost\, dynamic routing with \DynamicRouteValueTransformer\, host matching, and specific configurations for MVC, Razor Pages, and health checks. The update also includes new samples for authorization, metadata handling, and area-based routing.

projects/endpoint-routing · high confidence

Updated endpoint-routing sample to .NET 6 minimal hosting model

The endpoint-routing-6 sample has been migrated to the .NET 6 minimal hosting model, replacing the previous \Startup\ class pattern with a single \Program.cs\ entry point. This change updates the application to use \WebApplication.CreateBuilder\ for configuration and service registration, and \app.MapDefaultControllerRoute\ for endpoint setup, reflecting the modern minimal API approach introduced in .NET 6. The sample now demonstrates controller-based routing using this new model, ensuring compatibility with the latest .NET runtime and development practices.

(repo-wide) · high confidence

Updated hx-push-url sample for HTMX 4 inheritance rules

The hx-push-url sample has been updated to demonstrate HTMX 4 behavior, specifically requiring the explicit :inherited modifier on parent elements (e.g., hx-push-url:inherited="true") for attribute inheritance to work correctly. The sample now uses the HTMX 4 CDN build and includes a .NET backend that handles anti-forgery tokens for non-GET requests, ensuring the browser history updates correctly when clicking list items.

projects/htmx/push-url · high confidence

Updated hx-vals sample for HTMX 4 with antiforgery and dynamic values

The hx-vals sample application has been updated to demonstrate HTMX 4 features, specifically replacing the deprecated hx-vars attribute with the js: prefix for dynamic values. The example now includes an ASP.NET Core antiforgery token implementation to secure POST, PUT, and PATCH requests, and validates the HX-Request header to ensure proper handling of HTMX interactions.

projects/htmx/hx-vals · high confidence

Updated to .NET 6 minimal hosting model

The routing sample has been migrated to the .NET 6 minimal hosting model, replacing the previous startup class pattern with a top-level Program.cs that uses WebApplication.CreateBuilder and direct route mapping. This change updates the development environment configuration (launch.json and tasks.json) to align with the new project structure and runtime requirements.

projects/mvc/routing/routing-7, projects/mvc/routing/routing-9 · high confidence

Wiki application migrated to .NET 6 Minimal APIs

The Wiki sample application has been updated to target .NET 6 and refactored to use the Minimal API hosting model. This change replaces the previous \FeatherHttp\ framework with the standard \WebApplication.CreateBuilder()\ entry point, simplifying the application structure while retaining existing functionality for page editing, attachment management, and markdown rendering.

projects/sfa/wiki · high confidence

Fixes

Fix null reference error when Accept header is missing

The request-headers-typed sample now safely handles cases where the HTTP Accept header is absent. Previously, accessing this header could cause a null reference exception; the updated code checks for the presence of Accept entries before reading them, displaying '(none)' instead of crashing when the header is not provided.

projects/request/request-headers-typed · high confidence

The cookies-2 sample application now correctly appends the Set-Cookie header before writing any response body content. This change prevents the 'Headers are read-only' exception that previously occurred when attempting to set a cookie after the response had started streaming, ensuring that cookies are reliably delivered to the client.

projects/request/cookies-2 · high confidence

Test coverage

Added NUnit 1 sample demonstrating WebApplicationFactory usage

Added a new sample project in \projects/testing/nunit-1\ that demonstrates how to write unit tests for an ASP.NET Core application using NUnit and \WebApplicationFactory\. The sample includes a simple 'Hello world' web application and a corresponding test project that uses \HttpClient\ to query the in-process web application instance, verifying the response status and content.

projects/testing · high confidence

Dependencies

Samples upgraded to .NET 10.0 Preview 7

The sample projects in the repository have been updated to target .NET 10.0 (net10.0) and set LangVersion to preview. This includes upgrading ASP.NET Core NuGet packages (such as Microsoft.AspNetCore.Components.WebAssembly, Microsoft.AspNetCore.Authentication.JwtBearer, and Microsoft.AspNetCore.OpenApi) to version 10.0.11, and updating third-party dependencies like Scalar.AspNetCore to 2.16.19 and EventAggregator.Blazor to 2.0.0.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 35 → 37 (+2.6)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.3) — scores are not directly comparable.

Lenses

  • Code Health 47 → 47 (-0.0)
  • Architecture 91 → 87 (-3.5)
  • Maturity 60 → 64 (+4.2)
  • Readiness 20 → 24 (+4.3)
  • Security 62 → 60 (-1.5)
  • Accessibility 36 → 37 (+1.2)
  • Performance 81 → 94 (+13.5)

Resolved (280)

  • Change coupling: Program.cs ↔ Program.cs (projects/rewrite/rewrite-1/Program.cs)
  • Coverage not measured — no coverage collector is wired up
  • Documentation: no project overview (projects/authentication/readme.md)
  • Documentation: no project overview (projects/grpc/README.md)
  • Duplicated block (11 lines × 2) (projects/generic-host/generic-host-1/Program.cs)
  • Duplicated block (11 lines × 2) (projects/generic-host/generic-host-configure-app/Program.cs)
  • Duplicated block (15 lines × 2) (projects/generic-host/generic-host-3/Program.cs)
  • Duplicated block (17 lines × 2) (projects/mvc/localization/mvc-localization-10/Program.cs)
  • Duplicated block (8 lines × 5) (projects/unpoly/up-flashes/Program.cs)
  • Inconsistent naming for greeting-related concepts: 'MorningGreeting' and 'EveningGreeting' use a specific time qualifier as a prefix, while 'Greeting' is a generic base concept. Additionally, 'Greeting' exposes a method 'Greet()' (verb) while the others expose a 'Message' property (noun). This suggests 'Greeting' might be a base class or interface, but the naming convention for the specific instances (TimeQualifier + Greeting) differs from the generic concept (Greeting).
  • Inconsistent tense usage in lifecycle event names: 'OnStopping' (present participle) vs 'OnStopped' (past participle). While this may reflect different stages of the lifecycle, consistency in tense (e.g., 'OnStart'/'OnStop' or 'Starting'/'Stopped') is preferred for clarity.
  • Leaked secret: hardcoded-credential (projects/password-hasher/Program.cs)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • NoWarnInCsproj repeated across 11 files (projects/mvc/nswag/nswag.csproj)
  • NoWarnInCsproj repeated across 16 files (projects/elsa/writeline-activity/writeline-activity.csproj)
  • Use of numeric suffix '2' in type name 'Message2' suggests a lack of descriptive naming for a distinct concept. 'Message' and 'Message2' are likely related but distinct types, and the numeric suffix is not descriptive.
  • …and 260 more

New (400)

  • Documentation: no build, run or usage example (projects/application-environment/README.md)
  • Documentation: no build, run or usage example (projects/authentication/authentication-1/Readme.md)
  • Documentation: no build, run or usage example (projects/authentication/authentication-2/Readme.md)
  • Documentation: no build, run or usage example (projects/authentication/authentication-3/Readme.md)
  • Documentation: no build, run or usage example (projects/blazor-ss/ChatR/README.md)
  • Documentation: no build, run or usage example (projects/blazor-ss/ComponentEvents-2/README.md)
  • Documentation: no build, run or usage example (projects/blazor-ss/ComponentEvents/README.md)
  • Documentation: no build, run or usage example (projects/blazor-ss/JsIntegration/README.md)
  • Documentation: no build, run or usage example (projects/blazor-ss/Layout/README.md)
  • Documentation: no build, run or usage example (projects/blazor-ss/Localization-2/README.md)
  • Documentation: no build, run or usage example (projects/blazor-ss/Localization-3/README.md)
  • Documentation: no build, run or usage example (projects/blazor-ss/Localization-4/README.md)
  • Documentation: no build, run or usage example (projects/blazor-ss/Localization/README.md)
  • Documentation: no build, run or usage example (projects/blazor-ss/RenderTreeBuilder/README.md)
  • Documentation: no build, run or usage example (projects/blazor-ss/RssReader-2/README.md)
  • Documentation: no build, run or usage example (projects/blazor-ss/StartingVariation/README.md)
  • Documentation: no build, run or usage example (projects/blazor-ss/WallOfCounters/README.md)
  • Documentation: no build, run or usage example (projects/blazor-ssr/RazorComponentEleven/README.md)
  • Documentation: no build, run or usage example (projects/blazor-ssr/RazorComponentFive/README.md)
  • Documentation: no build, run or usage example (projects/blazor-ssr/RazorComponentFour/README.md)
  • …and 380 more

API surface

  • Unchanged — 151 HTTP endpoints

Architecture

  • Unchanged — 473 containers · 1 contexts · 0 edges

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

dodyg/practical-aspnetcore was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 12 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit d4acfb416cbd8475279899ba3677487a1d1ece0f — the exact code this score is about.
  • Scored under rubric-2026.11.3 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.42+preprod-6bc2a431cb25.