I am a constant learner and as a part of that effort I try and read one thing each day. Hopefully you will find this information useful.
Every time I have to do docker work, I forget that Docker for Windows needs to authenticate using your Docker Hub “username” and not your “email address”. This is so confusing because Docker Hub will allow you to use your email address when you visit the website and from the tray application in Docker for Windows.
When you use your email address to authenticate with docker it creates all sort of problems with Docker for Windows and Visual Studio. Running docker login from the Command Prompt shows the issue. If you use your email address, it works fine on hub.docker.com and from the tray application, but you will experience issues with docker login and Visual Studio. The issues include failed deployments, failing to start docker, failing to authenticate, and more. All of these errors are almost random. You can even get into a bad state where you feel that you have to reset docker.
I am working on fixing a database that uses GUIDs (i.e. uniqueidentifier) as primary keys. Our customer does a high number of inserts and generates their keys from their application or from NEWID(). In addition, their primary keys are clustered. There are many articles on the Internet that talk about the problem of using non-sequential GUIDs as primary keys. Kimberly Tripp over at SQLSkills has a good article here. The short description of the problem is that generating a non-sequential key can create fragmentation. Unless you use a function that generates sequential GUIDs, like NEWSEQUENTIALID, you are bound to see fragmentation. Additionally, a GUID is an unnecessarily wide key and can bloat your non-clustered indexes and add significant overhead in terms of wasted space and query performance.
I love GUIDs as keys, but not primary keys. In order to fix this problem, I created a database generated identifier (i.e. IDENTITY) as the primary key with an integer (i.e. int) data type. I then create a unique index on the original GUID which gives me the benefit of having the best of both worlds. First, a small, sequential identifier that is highly optimized for querying, joins, and storage. And second, a globally unique identifier which I can share outside my application.
NOTE: We see this problem all the time. That is what happens when you have developers manage your database.
First, let me say that we love IdentityServer4. It doesn’t hurt that we have been using IdentityServer since its early days or that Brock Allen is a good friend of ours. We are doing some IdentityServer work for our customers and I needed to create a sample application that requires authentication for all pages. After some digging around, I found that we can add a global filter for authorization. Neat!
One of the most useful tools for Windows is Paint.NET. Apple had created their version of a simple paint application many years ago but has since abandoned it. I wanted to get one for my Mac and after a quick search came across Paintbrush.
Paintbrush – The Bitmap Image Editor for Mac OS X
We are building a product from scratch. As such we are running into minor issues just getting everything set up when we are creating the code. Interestingly I was having an issue accessing my configuration. Originally I had just put the property on the class forgetting that I needed to define a constructor so that the configuration would be injected. Good on you Microsoft sticking to constructor injection!
Recently I had an issue where I did not have the latest version of .NET Core installed. To check which versions I had installed I used the following command:
Recently we were doing some work on ASP.NET Core Identity. We created a SQL Server database project to contain the database and imported the existing database. Unfortunately, we kept getting the following error on build.