Skip to main content

C# Random Password Generator for ASP.NET Core & ASP.NET MVC Identity Framework

Yesterday I had to create a C# method that creates a random generated password in C#. Before committing into it I spent some minutes surfing the web, trying to find something I could use. I stumbled upon this 2006 post from Mads Kristensen, which is a guy I seriously love for all the great work he did with some incredibly useful Visual Studio extensions such as Web Essentials, Web Compiler, ASP.NET Core Web Templates – and much more.

However, the function I found in that post didn’t help me much, because it had no way to ensure any strong-password requisite other than the minimum required length: more specifically, I need to generate password with at least one uppercase & lowercase letter, digit and non-alphanumeric character – and also a certain amount of unique characters. The random password generated against the Mads function could have them or not, depending on the randomness: that simply won’t do in my scenario, since I had to deal with the UserManager.CreateUserAsync(username, password)  method of the Microsoft.AspNetCore.Identity  namespace, which utterly crashes whenever the password isn’t strong enough.

Read More

ASP.NET Core: Cloud-ready, Enterprise Web Application Development – The Book

After some weeks of delay due to technical reasons the Learning Path edition of my ASP.NET Core and Angular book is finally out throughout the Amazon (and non-Amazon) marketplaces all over the world. The name is ASP.NET Core: Cloud-ready, Enterprise Web Application Development and it comes as part of the Packt Book’s Learning Path series: each of these paths features a different course for readers to give them a one-stop learning experience with different technologies. Needless to say, the course is about a full-stack programming experience with ASP.NET Core, using modern client-side frameworks (such as Angular) for the GUI part.

Here’s the updated cover:

Read More

How to fix the “No executable found matching command dotnet-ef” error in Visual Studio with .NET Core

If you’ve stumbled upon this post it probably means that you’re trying to use Entity Framework Core in a .NET Core Visual Studio project with the dotnet ef CLI or Powershell command, which gives you the following error:

No executable found matching command “dotnet-ef”

This can be a nasty issue due to the fact that the framework gives little or no info, thus it’s not easy to understand what it actually lies under the hood. Luckily enough, there are a few things you can try that will most likely help you to fix that for good.

Read More

PasswordCheck – A small C# class to calculate password strength and implement custom password policies in ASP.NET

If you’re looking for a decent password strength control implementation for ASP.NET C# you could find this class I made a while ago useful enough. After all these years I’m still using it in a number of projects, from the good-old ASP.NET ASPX Forms to the new ASP.NET Core MVC applications.

The class can be used to perform basically all the required checks in a very customizable way: minimum length, maximum length, digit/numbers, special characters and so on. It features a PasswordStrength enum (and a GetPasswordStrength method) which you can use to calculate the average strength of any given password: it can be handy for general-purpose scenarios, when you don’t have to implement a given password policy. In case you have to do that, you can use the helper methods instead and combine them to suit your needs as shown in the sample implementation provided within the IsStrongPassword method – which is the one I’m still using in most cases.

The methods are quite self-explanatory, so there isn’t much more to say: if you like the class, feel free to leave a feedback in the comment section below!

Read More

Visual Studio 2017, VS2015, VS2013, VS2012, VS2008, VS2005, VS2003 and VS6 Offline Installers & ISO files for download (All Versions)

Some weeks ago we published a rather comprehensive list of all Microsoft Visual Studio Build Numbers, Version IDs and Default Paths from VS6 to VS2017. For those who keep asking where they can download the ISO files of the older builds, we put together this far-from-complete list containing some of the most known official direct download links for the offline installers and/or ISO files, together with service packs and support files.

IMPORTANT: Let’s make it clear, this is not warez or pirate software: what we’re giving here is merely a list of links to some official Microsoft distributions offline installers public links collected from Google, StackOverflow and some MS support sites & forums.

If you want to add a new direct download link or make us aware of a broken one, write it on a comment and we’ll act accordingly adding or deleting the respective URL. It’s worth noting than we will only accept official links from any certified Microsoft-owned website.

Read More

Close