dotnet add package Westwind.AspNetCore --version 3.8.7
NuGet\Install-Package Westwind.AspNetCore -Version 3.8.7
<PackageReference Include="Westwind.AspNetCore" Version="3.8.7" />
paket add Westwind.AspNetCore --version 3.8.7
#r "nuget: Westwind.AspNetCore, 3.8.7"
// Install Westwind.AspNetCore as a Cake Addin #addin nuget:?package=Westwind.AspNetCore&version=3.8.7 // Install Westwind.AspNetCore as a Cake Tool #tool nuget:?package=Westwind.AspNetCore&version=3.8.7
Utility library providing useful helpers, formatters and extensions for ASP.NET Core
This is a small helper package that provides a number of small helper and extension classes that facilitate common operations in ASP.NET Core and MVC applications.
You can install the package from NuGet in Visual Studio:
PM> install-package westwind.aspnetcore
dotnet command line:
dotnet add package westwind.aspnetcore
BaseController and BaseViewModel implementation
A common base controller class that adds support for an auto-initialized BaseViewModel from which other VMs can inherit. Allows for automatic initialization of common features like ErrorDisplay and Base View models.
Render Razor/MVC view output to a string using a controller context.
FormVariable to Object Instance Binder
Request.Formunbind routine that allows you to unbind form variables into an existing object only updating properties that are are available in the request form context.
AppUser ClaimsPrincipal and Cookie Authentication Helper
AppUserclass that wraps a
ClaimsPrincipaland makes it easier to add and retrieve claims as well as easily login and logout all from a single helper object.
Bootstrap Alert ErrorDisplay Tag Helper and Controller Support Feature
In most MVC applications you need some sort of error display and this ErrorDisplay TagHelper makes it quick easy to display an Alert box from a custom
ErrorDisplayModelinput. Helper methods like
BaseViewModelmake it very easy to display error and informational messages on pages.
Api Error Handling Filter
A custom API error filter implementation that returns API responses on exceptions. Also provides a standardized
ApiExecptionclass that can be used to force responses with specific HTTP response codes.
Api Base Response Object
ApiResponsebase class that can be used to return consistent API results that include error status, error message, status code as well as the actual data. Both typed and untyped versions.
RawRequest Body String Formatter
API formatter that allows for receiving raw non-json content to
byteparameters, which otherwise isn't supported by MVC's API implementation. More info in blog post.
User Token Manager
A database driven token manager that can create, store, validate and manage the life time of short lived generated tokens. Useful for creating tokens that are assigned after an initial authentication and then used for API access.
General ASP.NET Core
Custom Headers Middleware
Allows adding and removing of HTTP headers to every request using middleware configuration.
GetRawBodyBytesAsync()- retrieve raw non-JSON content
MapPath()- Map virtual path to physical path on disk
Params()- Return an item from Form, Query or Session collections.
Helper to make it easier to use the DataProtector API to create secure tokens.
The UserState object greatly simplifies working with auth 'cached' token data more easily by storing a single value in a user claim or forms auth ticket that can be easily restored into an typed object. The class supports easily serialization and auto-loading from Claims. Can be extended by subclassing and adding your own values.
The Westwind.Web.MarkdownControl library is an open source product licensed under:
All source code is © West Wind Technologies, regardless of changes made to them. Any source code modifications must leave the original copyright code headers intact if present.
There's no charge to use, integrate or modify the code for this project. You are free to use it in personal, commercial, government and any other type of application and you are free to modify the code for use in your own projects.
If you find this library useful, consider making a small donation:
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BA3NHHFHTMXD8" title="Find this library useful? Consider making a small donation." alt="Make Donation" style="text-decoration: none;"> <img src="https://weblog.west-wind.com/images/donation.png" /> </a>
|Product||Versions Compatible and additional computed target framework versions.|
|.NET||net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed.|