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…
.net
C# 7.0 adds a number of new features and brings the focus on data consumption, code simplification and performance. Perhaps the most interesting feature is tuples, a finite ordered list of values, of possibly different types, which is used to bundle related values together without having to create a specific type to hold them. Tuples are very good for performance reasons, as you don’t…
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…
In order to use .NET Core on your Mac, you first need to install the latest version of OpenSSL. The easiest way to get this is from Homebrew.
1 | ~$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
After installing brew, you need to do the following:
1 2 3 4 | ~$ brew update ~$ brew install openssl ~$ ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/ ~$ ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/ |
When trying to initialize a basic .NET project through dotnet new or restoring packages on an existing one, using dotnet restore, you might come across…
There are some scenarios where you might want to reinstall nuget packages in your projects, like for example: Project Retargeting or Upgrade This can be useful when a project has been retargeted or upgraded and if the package REQUIRES reinstallation due to the change in target framework. You Broke the Project In case, you have inadvertently modified contents installed from a…
Since Azure SDK 2.7 for .NET App Service Tools for Visual Studio 2015 supports remote profiling for Web Apps, API Apps and WebJobs running in Azure. So, in case you want to analyze performance issues in your application there are three ways you can do it: Using Visual Studio 2015 Browsing the Azure App Service’s Site Control Management dashboard (aka kudu) Using…
ServiceStack has recently announced that will go commercial from version 4 and on. Although it is a very useful library that worth paying for you might not want to go straight ahead to acquire a license. One option is to downgrade to version 3.9.71 which is free to use and decide later if you want to buy a license or find a better alternative. In…
In Entity Framework when you want to insert multiple items in your database you usually add your objects in your DbSet and then call context.SaveChanges at the end. This action, you may think, performs bulk inserts in your db but in reality things are a bit different. In the following example, we are going to generate multiple objects from our model Products and try to…
What is AutoMapper? AutoMapper is a simple little library built to solve a deceptively complex problem – getting rid of code that mapped one object to another. This can be very useful when you want to map your Model to ViewModel and vice versa, without writing and maintaining property mapping between those objects. How to Install it AutoMapper is available through Nuget, so…