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.
Blog
-
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.
-
Using a forEach loop with JavaScript
I honestly feel like I’ve been living in the stone age. For years I’ve always used a standard for loop when iterating JavaScript arrays accessing the property with the index of my for loop. No longer, it’s time to upgrade (my brain) and use the forEach loop.
-
Knockout.js foreach afterRender when loop is completed
I have been using Knockout.js’s afterRender for years to hide a progress bar when the foreach loop completed. All of those years I have been using it incorrectly. Once I read Knockout’s documentation about the foreach data binding function, I realized that it is actually called after each render of the element inside the foreach. This is definitely not how I wanted this function to work. In this Knockout.js tutorial let me show you my solution to accomplish applying the afterRender when the foreach has completed.