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.
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).
Asp.Net Core provides a unified model for MVC and WebAPI and default templates use unified meta packages dependencies. This simplifies evolutions but we can also choose to lighten Web API using only needed dependencies. How to to it is detailed in Removing the MVC Razor dependencies from the Web API template in ASP.NET Core.
Sample code provides AddWebApi as a light version of AddMvc.
Something found by chance A library for building cross-platform apps – ReactXP. It’s “a thin cross-platform layer” “currently supports the following platforms:
- iOS (React Native)
- Android (React Native)
- Web (React)
- Windows 10 – UWP (React Native) – in progress”
A custom HttpContent (see StreamExposerContent implementation) with a smart trick to export Stream: Externalizing the HttpClient internals for fun & profit – Ayende @ Rahien
With this single line in change log:
Change – Removed .NET 4 portable class library target from NuGet package
Json.Net has also removed the Silverlight 5 support.
A middleware to provide specific html pages for some error and default one for others while returning correct http error code as status: Re-execute the middleware pipeline with the StatusCodePages Middleware to create custom error pages.
We can also want to know the original path that actually caused the error: pretty easy using Request Features in ASP.NET Core and querying for IStatusCodeReExecuteFeature. In fact, current implementation of this interface also provides error query string (but it will not be reflected into interface before .Net 2.0): Retrieving the path that generated an error with the StatusCodePages Middleware