Check For SQL Authentication Type Before Adding Users
While setting up a new team member to run a WPF app locally we ran into an error. It look about 30 minutes to realize our setup SQL script was creating a user in SQL server, but mixed mode authentication was not turned on.
To prevent having to relearn this problem again in the future we’ve added this code to our SQL script, right before the CREATE LOGIN command.
Now if we ever have another team member try to run the setup scripts without mixed mode authentication turned on they’ll get an error telling them exactly what is wrong.