Recently I was stuck with the error Try removing one of the references or sign them to enable side-by-side. This is not a common error, but I received it because I was in the very unfortunate situation of requiring to have two different versions of the same DLL installed in my solution. Let’s explore how I worked around this.
Category: ASP.NET
-
Creating a Windows Self-Signed SSL Certificate for use with IIS
I recently showed how to setup an SSL certificate using nginx, in this article I will demonstrate how to create a Self-Signed SSL certificate that can be used with IIS.
-
HtmlHelper Extenstion to convert HTML to JSON C#
Let’s create an HTML Extension for C#’s HtmlHelper class that converts a class or object to JSON for use with your JavaScript code. I use this in my MVC projects inside my Razor Views. The solution leverages NewtonSoft’s JsonConvert NuGet package to convert with C# HTML to JSON.
-
Controller does not have a default constructor
I use Ninjection for my C# MVC project. As I’ve discussed in Advanced Automatic Ninject Bindings Advanced my Ninjection is automated based on Interfaces matching Class Names. So when the dreaded Controller does not have a default constructor error occurs I have two common starting points.
-
C# Ordinal String Extension
Let’s explore creating an extension method to convert a number to an ordinal value, e.g. 1st, 2nd, 3rd, etc.