Token Based Authentication in ASP.Net using JWTs Part 1

AJLately, I’ve been doing quite a bit of front-end development with the latest version of Angular and that requires token based authentication. So in this article let’s discuss how to create tokens in .Net.  I’ll go over setting up tokens in regular .Net, and in a later article, I’ll discuss how to setup tokens in .Net core.

All of the code can be obtained from Github Here.

Continue reading “Token Based Authentication in ASP.Net using JWTs Part 1”

Mongo String Indexing part 1

misc1Overview

We have a Mongo Database and in that database we have an ‘items’ collection which has five string fields and a number of ID fields.  We’ve added 250k records to this collection and started testing the time it takes to perform various queries on these fields.  Simply adding indexes on the ID fields makes those types of queries lightning fast, however, we had a number of issues dealing with various string queries.  This is a record of our findings.

Continue reading “Mongo String Indexing part 1”

MongoDB for Custom Data Fields

Rick HerrmannWe have an application that contains a mix of relational data and dynamically structured data. All of the data is currently stored in SQL Server, with the dynamic portion of the data models being stored in string columns as json data. If all we needed to do with the non-relational data was to display it on various screens, SQL Server would work great.

Continue reading “MongoDB for Custom Data Fields”

Database Updates With Code First Migrations

Rick HerrmannI have been working with EF Code First Migrations for a while but until recently had not used it for updating more than a local development database.  As I discovered, it is actually pretty easy to run your migrations against different databases.  The update-database command has an optional switch for a ConnectionStringName.  However, if you are using web.config transformations to manage connection strings for different environments, you may only have one connection string name, with the environment specific connection string being defined in each transform.  I’ll explain how I am getting around that.

Continue reading “Database Updates With Code First Migrations”