Brent

About Brent

This author has not yet filled in any details.
So far Brent has created 72 blog entries.

February 3, 2015

Custom 401 error pages in MVC alongside Windows Authentication

By |2018-03-05T22:32:04+00:00February 3rd, 2015|Categories: ASP.NET, IIS, MVC|Tags: , , |

We use windows authentication for a lot of our web apps, but also want to serve up a custom 401 error page when users are not authorized to log in. This is tricky because this specific 401 error is handled directly by IIS, rather than the application itself, because it's a windows directory permission. I spent [...]

January 3, 2015

Libraries for Unit Testing MVC5 Controllers

By |2015-01-03T17:25:04+00:00January 3rd, 2015|Categories: C#, General Technology, MVC, Testing|Tags: , |

There are various libraries available to help you unit test your controller actions, returned views and models, and action results with MVC. One that I have recently started using is TestStack.FluentMVCTesting. This library allows you to perform actions on your controllers within your unit tests, and then verify, with a fluent syntax, that those actions behaved [...]

September 17, 2014

WordPress Infinite 302 Redirect loop on login after Reverting or Overwriting Folders

By |2014-09-17T16:48:15+00:00September 17th, 2014|Categories: Wordpress|Tags: , |

A few weeks ago, I updated a WordPress installation to 4.0, only to find out that the theme it was using, was not yet fully compatible with 4.0. So in order to revert to a prior version of WordPress, I had to download the version I wanted, and remove and re-upload only the wp-admin and wp-includes directories. [...]

August 28, 2014

Mocking a generic ObjectSet or IObjectSet for Unit Testing Entity Framework Business Logic

By |2014-08-28T21:35:42+00:00August 28th, 2014|Categories: C#, Testing|Tags: |

Up until this point, I had mostly been using nHibernate for my ORM solution in most applications I work on. So when I started diving into Entity Framework (EF) models and trying to write unit tests against logic that lives in EF entities, I first encountered the ObjectSet<T> type. Now to be clear, I was not [...]

July 8, 2014

New Website Launch – SpeechWorks

By |2018-04-01T02:02:23+00:00July 8th, 2014|Categories: Clients, Web Design|

I'm proud to announce the launch of a new website for SpeechWorks LLC of Oconomowoc, WI. SpeechWorks is run by Jann Fujimoto, a certified speech-language pathologist and the owner of SpeechWorks LLC. SpeechWorks provides convenient speech-language therapy services in your Lake Country area home, pre-school or daycare. They offer speech therapy related treatment, evaluation, screening, and [...]

May 8, 2014

New Website Launch – Friends of Lake Wingra

By |2018-04-01T02:01:52+00:00May 8th, 2014|Categories: Clients, Web Design|

It was a priviledge to create a website for an organization like Friends of Lake Wingra. FOLW has a common interest in perserving and improving the health of the Madison Lake. They came together in 1998 and have been improving the lake through projects and community awareness ever since. I appreciated the opportunity to create a [...]

April 24, 2014

MVC Model Binding with an Ajax Form Submit

By |2014-04-24T16:19:52+00:00April 24th, 2014|Categories: C#, MVC|Tags: , , , , |

You may come across a time where you would like to submit a form using Ajax, and still want to preserve the useful model binding of MVC. Normally when you submit a form using a standard submit (non async), the MVC framework will automatically take care of pulling your values out of your form and populating [...]

January 24, 2014

C# String extension method to escape characters for regular expressions (regex)

By |2014-01-24T07:43:31+00:00January 24th, 2014|Categories: C#, Handy Tools/Utilities|

I needed a way to escape special regex characters in a string. These characters include the following: ".", "$", "^", "{", "[", "(", "|", ")", "*", "+", "?", "\\" . This list was obtained from http://msdn.microsoft.com/en-us/library/4edbef7e(v=vs.110).aspx Here is a small string extension method that will accomplish this: Edit*- 1/24/13 - I didn't realize there was a built in [...]

Visual SVN Context Menu is Missing – Fix

By |2018-03-05T22:35:39+00:00January 14th, 2014|Categories: Handy Tools/Utilities, Misc. Fixes|

I use VisualSVN at work and I love it! It saves clicks and times when developing with Visual Studio and SVN. Recently my SVN context menu seemingly went missing from Visual Studio, causing me a bunch of confusion. (Menu pictured below was not appearing when right clicking a file in my solution)   Fix: To see [...]