ASP.NET Core Identity uses default values for settings such as password policy, lockout, and cookie configuration. These settings can be overridden in the Startup class. By default the Password Policy has the following options: RequireDigit: (default: true) Requires a number between 0-9 in the password. RequiredLength: (default: 6) The minimum length of the password. RequireLowercase: (default: true) Requires a lowercase character…
asp.net core
If you have an ASP.NET Core web application that already has JWT authorization, this guide will help you add JWT (JSON Web Token) support to the Swagger UI. What is Swagger UI? Swagger UI is a collection of HTML, Javascript and CSS assets that dynamically generates beautiful documentation from a Swagger-compliant API. You can learn more in https://swagger.io/ and in the project’s…
Some really easy ways to improve performance in your asp.net core web application are: response caching, which adds cache-related headers to responses, to reduce the number of requests a client makes to your web server; compressing response using gzip to reduce its size. You may start with the default asp.net core web application, apply the above steps and check the result. Setup…
Sometimes you may need to render a certain view as string, for example when you want to send an email where usually the body is pure html. To do so, you need to create a service that takes two arguments: the first one is a string representing the path to the view you want to render; the second one is an object that is used from…