Monthly Archives: August 2014

No Entity Framework provider found for the ADO.NET provider with invariant name ‘System.Data.SqlClient’ – MVC5

Hey everyone,

Just an error I came across while trying to use a new solution project:

No Entity Framework provider found for the ADO.NET provider with invariant name ‘System.Data.SqlClient’

The fix for this was simply to run the following command in the package manager console:

  1. PM> Install-Package EntityFramework

Thanks to StackOverflow for the details: http://stackoverflow.com/a/18642452/522859

Change Default MVC5 Password Complexity Requirements – Passwords must have at least one non letter or digit character. Passwords must have at least one digit (‘0’-‘9’). Passwords must have at least one uppercase (‘A’-‘Z’)

Hey everyone,

I’ve started on a new MVC5 project and came across the following error message while trying to register a new user:

Passwords must have at least one non letter or digit character.
Passwords must have at least one digit (‘0’-‘9’).
Passwords must have at least one uppercase (‘A’-‘Z’)

While having a secure password is obviously important, I felt that most users would probably find these requirements a little extreme. After a bit of Googling I came across a StackOverflow post that mentioned a config class that you can use to edit these settings:

  1. // App_Start > IdentityConfig.cs
  2.  
  3. ...
  4.  
  5. // Configure validation logic for usernames
  6.             manager.UserValidator = new UserValidator<ApplicationUser>(manager)
  7.             {
  8.                 AllowOnlyAlphanumericUserNames = false,
  9.                 RequireUniqueEmail = true
  10.             };
  11.             // Configure validation logic for passwords
  12.             manager.PasswordValidator = new PasswordValidator
  13.             {
  14.                 RequiredLength = 6,
  15.                 RequireNonLetterOrDigit = true,
  16.                 RequireDigit = true,
  17.                 RequireLowercase = true,
  18.                 RequireUppercase = true,
  19.             };
  20.  
  21. ...