C# tutorial on partial JSON deserialization using System.Text.Json.Nodes.JsonNode to extract specific data without full deserialization.
Tag: Asp.net
Learn how to URI encode strings and query parameters in C# using
System.Uri.EscapeDataString. This tutorial provides code examples for basic encoding and within an ASP.NET integration test.
A tutorial on adding API versioning to ASP.NET Core endpoints for .NET 8 and .NET 9, covering setup with OpenAPI/Scalar and Swagger, and providing code examples for implementation.
Explains how to access global JSON serializer options in ASP.NET Core using dependency injection for consistent serialization/deserialization outside of controllers.
Learn how to integrate Razor Pages into your ASP.NET Core Web API project to serve dynamic HTML content. This tutorial covers necessary configurations in Program.cs and demonstrates creating a basic HTML page with Razor syntax.
Demonstrates returning HTTP error responses with strongly-typed responses in ASP.NET Core using ActionResult for validation and authorization.
Tutorial on serving embedded resources in ASP.NET Core for debugging/simple scenarios, covering .csproj configuration and C# examples for accessing resources.
In .NET 9, please use Scalar. Add a dark theme to your ASP.NET Core Swagger UI. This guide provides two methods: serving a CSS file from wwwroot or using an embedded resource.
Configure ASP.NET Core routes to automatically follow method names using
[Route("[controller]/[action]")] on the controller, reducing the need for individual route decorators and streamlining API development.
A concise tutorial on implementing JWT authorization in ASP.NET Core, with code examples for configuration, setup, token generation, and securing API routes.
Implement hyphen-separated (kebab-case) routes in ASP.NET Core 7.0 by creating a custom parameter transformer and adding it to your MVC conventions.
Learn how to serialize enums as strings in ASP.NET Core for consistent JSON handling on both the backend and client-side using
JsonStringEnumConverter.
Handle optional JSON fields and serialize enums as strings in ASP.NET Core. Configure
JsonSerializerOptions globally or use attributes for precise control over JSON output.
Configure your ASP.NET Core Web API project for debugging in Visual Studio Code using a custom
launch.json file, enabling a native development experience.