ASP.Net Identity EF Users Primary Key Change

misc1Recently, I worked on converting a .Net API from a 3rd party authentication mechanism to internal and we chose to use the Identity framework.  By default, Identity uses a string as the primary key for the AspNetUsers table and that was an issue because our current users table used a long (and there were a lot of foreign key references to it).

Continue reading “ASP.Net Identity EF Users Primary Key Change”

Codemash 2016 – Humanitarian Toolbox

Rick HerrmannFor the second Codemash pre-compiler day I spent the full day working on the Humanitarian Toolbox project @htbox) with Bill Wagner (@billwagner) and Tony Surma (@tonysurma) and 5 other developers.

What is it?

The Humanitarian Toolbox is an open source non-profit organization, that creates software for disaster response teams. To kick things off, Tony gave us an overview of the projects and we pulled the code from GitHub.

Continue reading “Codemash 2016 – Humanitarian Toolbox”

Simplify Asynchronous Calls in .NET

misc3_bgSince .Net 4.5, the async/await pattern has been a great tool to simplify asynchronous calls.  However, in WPF I frequently need to make async calls from a non-async function or event.  Often, this happens because I’m overriding a virtual function in an inherited class of a framework that I’m using and that function is synchronous.  To help with this, I created an async helper class:

Continue reading “Simplify Asynchronous Calls in .NET”

Spacial Data in SQL Server

3It’s not very often which you deal with spacial data in SQL. In fact, I find it to be a very rare occurrence, but when it does happen, it’s nice to know that there are two libraries for it: geometry (which is for Euclidean Geometry) and geography (which uses lat/long, and takes into account the curvature of the earth).

Continue reading “Spacial Data in SQL Server”

Compatibility Switches

3In the new version of .NET (version 4.6), Microsoft came out with AppContext. This little class has two methods: SetSwitch and TryGetSwitch.

The idea behind these two methods is to allow op-out functionality of new features. If for example, you want to change the format of the logs your library creates. You can have a switch called “Switch.MyLibrary.UseOldLogStyle” that allows the user to keep using the old format. This is great if the end user has some automation parsing the existing logs, and don’t want their parser to break.

Continue reading “Compatibility Switches”

User Information in SharePoint Foundation

Mike BerrymanSharePoint Foundation does not have a User Profile Service, so how are users managed?

It turns out that there is a hidden system list on SharePoint Foundation (actually all versions of SharePoint, but much more useful in SharePoint Foundation).  To view this list, you simply visit http://<YourSharePointSite>/_catalogs/users/simple.aspx or details.aspx.

Continue reading “User Information in SharePoint Foundation”