How to handle raw data in request body either manually or by registering a custom InputFormatter: Accepting Raw Request Body Content in ASP.NET Core API Controllers – Rick Strahl’s Web Log.
One big issue with automatic conversion between content body and an action parameter is how to handle too big content (in case of DOS for example). Reading any content body into a byte array could be very dangerous for server health in case of a large body. This also prevents an always preferable handling using the streamed way.
How to create self-signed certificates, installed them as locally trusted and use them with ASP.NET Core on Windows, MacOx and Ubuntu.
via Develop Locally with HTTPS, Self-Signed Certificates and ASP.NET Core
A new version of regular .Net is coming.
There are many improvements in robustness but also new features and alignment on .Net Standard 2.0. Great!
dotnet/dotnet471-changes.md at master · Microsoft/dotnet
This sample code uses YamlDotNet to parse yaml and inherits from FileConfigurationSource and FileConfigurationProvider: Creating a custom ConfigurationProvider in ASP.NET Core to parse YAML.
A very usefull minimal http static file server in Asp.Net core (Starting a http file server from the file explorer using .NET Core – Meziantou’s blog). Can also be regsitered in Explorer contextual menu.
How to use CookieTempDataProvider to prevent requerying data during subsequent get request: Post-Redirect-Get and TempData with ASP.NET Core – Meziantou’s blog
On the road to breaking size limits, the futur of protobuf-net could be using Utf8String, Span<T>,ValueTask<T> when usefull and “Channels” (from corefxlab): Code, code and more code.: protobuf-net: large data, and the future
AspNetCoreRateLimit is an ASP.NET Core rate limiting solution designed to control the rate of requests that clients can make to a Web API or MVC app based on IP address or client ID.
via stefanprodan/AspNetCoreRateLimit: ASP.NET Core rate limiting middleware
When using StaticFileMiddleware and ResponseCompressionMiddleware, each file is read from slow disk uncompressed and then dynamically compressed (consuming CPU each time). It’s clearly ineffective in terms of CPU, disk and time.
A better approach is to pre compress some files on disk, mark them as already compressed using some kind of metadata and return them as is if compression is accepted or decompressed them dynamically.
This library provides a middelware to do it: AnderssonPeter/CompressedStaticFiles: asp.net middelware for Kestrel to serve precompressed static files.
It started with Use pre-gzipped content files? GitHub #1584.
EDIT: Also found a non core implementation. More limited but (gz only) but usefull: https://github.com/damianh/StaticFilesMiddleware (it’s a StaticFilesMiddleware replacement).