Windows Authentication and Web API 2

I've recently had a situation come up at work where I need to protect our ASP.NET Web API 2 deployment with Windows Authentication.  We run our web client through Chrome and IE and we needed the NTLM negotiation to be handled gracefully.  There are a few things that we had to put in place to get this to go.  Here they are in list form.  The code for both the problem and the solution is here on my github.

Read More

Revealing Module + Angular

Revealing Module + Angular

Recently, I've been getting deep into JavaScript.  It was my first programming language many years ago.  Since then, some extremely interesting patterns and practices have emerged.  As a primarily C# developer, I looked into the Revealing Module pattern as a way to ease myself back into JS coding in an OOP-friendly way.  

At work, I'm currently building a multi-module JS app with RESTful backend, using Google's AngularJS library for only one of the modules.  I was worried about how it would act when integrated with an app that also makes use of jQuery and Bootstrap.  As it turns out, it's totally fine!  This post is an overview of my approach to modularizing Angular functionality.

If you're the kind of person who likes to dig into the code before hearing the explanation, here's  a fiddle that contains everything I'll be talking about.

This post does assume some basic knowledge of how to set up an Angular app.  Instructions for that part can be found here on Angular's own tutorial.

Read More