Skip to content

Instantly share code, notes, and snippets.

View cmcnab's full-sized avatar

Chadwick McNab cmcnab

View GitHub Profile

Keybase proof

I hereby claim:

  • I am cmcnab on github.
  • I am chadwickm (https://keybase.io/chadwickm) on keybase.
  • I have a public key whose fingerprint is 3DF5 3612 F198 F600 B873 705E 3829 6C27 D3CD 7E9B

To claim this, I am signing this object:

@cmcnab
cmcnab / MachineKeys.cs
Created March 13, 2017 13:02
Extracting current ASP.NET machine keys and setting them without committing them to the Web.config
namespace MyApp.Web.Security
{
using System;
using System.Configuration;
using System.Reflection;
using System.Web;
using System.Web.Configuration;
public class MachineKeys
{
@cmcnab
cmcnab / NinjectResolver.cs
Created February 26, 2014 20:05
Ninject dependency resolver
namespace TestProject.Web.Infrastructure
{
using System.Web.Http.Dependencies;
using Ninject;
public class NinjectResolver : NinjectScope, IDependencyResolver
{
private readonly IKernel kernel;
public NinjectResolver(IKernel kernel)