IIS Express - Turning on Windows Authentication

So I brought up a new machine and tried to run my ASP.NET web site in IIS Express that uses Windows Authentication and was greeted with the following error:


The requested page cannot be accessed because the related configuration data for the page is invalid.


This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault=”Deny”), or set explicitly by a location tag with overrideMode=”Deny” or the legacy allowOverride=”false”.

Read More ›

Do Not Swallow The Exceptions

Throwing away exceptions in your code is just a bad practice and makes it harder to support your application. It may make it easier for you as a developer to get something working but in the long run it cost way more money to do the maintenance and troubleshooting then if you had just put in proper exception handling to start with.

I have worked on several codebases recently where methods returned false if either a business rule failed or an unexpected exception occurred with no logging of the error anywhere. This made it extremely difficult to figure out what the issue was. In several cases, even when you hooked up a debugger there was no way to get at the exception details since the exception was not passed into the catch block.

Examples of Issue

Here are a couple of examples of what I am talking about when I say swallowing the exception.

Example 1: Totally Throwing Away Exception

In this example, the code does nothing with the exception and does not even tell the caller that something failed. I have spent many hours troubleshooting projects with this exact try/catch block and wondering why something that I thought should have worked was not, just to discover that deep down in the call stack it was swallowing the exception. Since the catch block is empty, there is no way to put a breakpoint in the catch block but even if you could, there is no way to get at the exception in the catch block since it was not passed into it. You would need to make a temp code change to add an exception parameter to the catch block and a bogus line in the catch block to be able to get at the exception.

public void SomeMethod()
        //Some Code That Errors

Read More ›

Vagrant - Fixing Opentable Basebox looking for Windows Plugin

As part of my demo during my Vagrant talk, I use the opentable/win-8.1-enterprise-amd64-nocm vagrant base box with the virtualbox provider. This vagrant base box unfortunately has an issue with the vagrantfile that is included with it looking for the old/unneeded vagrant windows plugin to be installed and trying to port forward the WinRM and RDP ports without detecting if the port is already in use.

Luckily, it is really easy to fix the included vagrantfile so that you can create vagrant machines but you have to do some prework before running a vagrant up using this base box.

Read More ›

Sync your Git Fork to the Original Repo

Syncing your forked repository to the original repository is an important step before submitting any pull request to the original repository for the changes in your forked repository. Even if you are not going to submit a pull request to the original repository, there are times that you want the additional features and/or bug fixes that have been done since you forked the original repository.

You could do a pull request but this adds an additional commit into your forked repository instead of making your forked repository match the original repository. In order to sync the forked repository without adding any additional commits as part of the process you need to configure the original repository as an upstream remote, merge in the changes from the original repository and then push the merged version back to Github.

Read More ›

Getting Visual Studio Cordova Tooling Working with the Ionic Framework

I am doing an Ionic Framework presentation and I wanted to use the Visual Studio 2015 Cordova Tooling.

I have done this presentation twice in the past couple of months using my Intel Nuc machine with the Visual Studio 2015 RTM Cordova tooling but it is kind of pain to do this since the Nuc is a desktop machine and doesn’t have a monitor so I have to look at the projector screen or being a laptop to use as well. Setting up 2 machines in 15 minutes as well is a pain and hoping that the remoting from the laptop to the Nuc is stable just asking for trouble even with a travel router that I have.

So I decided I would just get my laptop working with my demos since I already had Visual Studio 2015 installed and had everything I needed for Ionic already working.

I thought this shouldn’t take that long but unfortunately I ran into a bunch of issues. Luckily I have managed to fix all of the issue and can move on with the prep work for my presentation.

Read More ›

back to top 