Recent Weblog Posts


Bitmap types, Binary Resources and Westwind.Globalization
Friday @ 4:35pm

I've been working on supporting binary resource imports via the Web interface using Westwind.Globalization and I'm debating on whether supporting the .NET convention of importing image resources as Bitmaps is prudent. Bitmaps are rather unwieldy to use and are painful to export to common stream or file formats due to the funky 30 year old encoding architecture used by GDI+. In this post I talk about some of the issues I've run into with Bitmaps and why I'm considering importing resources simple as raw byte data.

2 comments
Updated DeleteFiles Utility now on Chocolatey
Tuesday @ 12:49pm

I've updated my DeleteFiles utility that can be used to recursively delete files and folders. I've recently updated the utility with a few new features including support for long paths (greater than MAX_PATH) that can choke out Explorer and other Windows shells. There are also additional options for previewing and recycle bin support as well quiet command line mode and a few improvements in the timeout filter for file selection. Last but not least, you can now install DeleteFiles directly from Chocolatey so it's easy to load DeleteFiles and get it onto your system and system path in seconds.

ASP.NET MVC, Localization and Westwind.Globalization for Db Resources
March 17, 2015 @ 4:53am

Recently I've been getting a number of questions related to customers having issues with running the Westwind.Globalization Database Resource provider library under ASP.NET MVC. While the original versions of this library were definitely WebForms centric since it originated in the WebForms era, the library has had full support for ASP.NET MVC for a while. In this post I'll review how localization works in ASP.NET MVC and then demonstrate how Westwind.Globalization handles the same scenarios with database resources.

3 comments
Cordova and Visual Studio CODE Magazine Article
March 04, 2015 @ 4:14pm

Looks like my "Taming Mobile Apps with Cordova and Visual Studio" article went live recently. If you want to find out how to use the new and pretty awesome Visual Studio Tools for Apache Cordova for building Web based, hybrid Mobile apps, this article is a great starting point. The article gives an overview of Cordova and then walks through examples with special focus on building iOS apps.

2 comments
Using FontAwesome Fonts for HTML Radio Buttons and Checkboxes
February 26, 2015 @ 4:29am

Spruce up your boring checkboxes and radio buttons with custom FontAwesome symbols using a little bit of CSS. If you're tired of boring checkboxes and radio buttons, or you simply want a more consistent look of these controls across browsers and controls check out FontAwesome to provide you with customizable checks and boxes to use for selection boxes. In this post I'll show how to use pure CSS to set up FontAwesome checkboxes and radios and talk about a few gotchas I ran into along the way.

3 comments
Back to Basics: UTC and TimeZones in .NET Web Apps
February 10, 2015 @ 4:21am

Storing dates in persistent storage using UTC dates is a widely accepted best practice. But it's surprisingly complex using date data effectively if you want to let the user see dates and query data in their local time zone. Looking around I noticed that there's not a lot of comprehensive info on this topic, so I decided to take notes and write down some of the approaches I've used in this post. This post combines and overview and a number of helper routines specifically geared towards user timezone adjustments in typical ASP.NET Web applications.

15 comments
Adding non-NuGet references to the new vNext Projects
February 03, 2015 @ 1:50am

vNext projects depend on NuGet packages to reference external dependencies. But vNext projects also support 'classic' .NET targets and the Full CLR vNext both of which support and even require assembly references in order to access core .NET functionality. In this short post I describe how you can reference external assemblies in non-vNext and FullClr vNext targets in vNext projects.

1 comment
Azure VM Blues: Fighting a losing Performance Battle
February 01, 2015 @ 7:39pm

I've been struggling with performance when putting up an Azure virtual machine with the eventual intend to replace my physical server. In this post I describe some of the performance issues I've run into with Azure Virtual Machines in a simple scenario of migrating a single Web site to a full VM setup.

35 comments
Blend Path interfering with C# Project Builds
January 15, 2015 @ 3:57am

Ran into a nasty Visual Studio error today that caused a compiler error related to an errand assembly reference from Visual Studio Blend. Blend? I don't even use Blend, and this is a Web Project. Here's what the problem is and how to get around it with a temporary hack.

1 comment
<main> HTML5 Tag not working in Internet Explorer 9/10/11
January 12, 2015 @ 3:09pm

Ran into a problem the other day with Internet Explorer 11 not rendering the HTML5
tag properly - or rather rendering as if it wasn't there at all. Here's the problem and the simple workaround.

3 comments
Tip: Create a Visual Studio Menu option to Open a Command Window
January 09, 2015 @ 2:35am

I'm finding myself using the command line more and more, especially with ASP.NET vNext for running Web apps from the command line, accessing git and JavaScript build tools. Here's a real easy way to pop open a Command Window in the active project directory from Visual Studio.

6 comments
Using Cordova and Visual Studio to build iOS Mobile Apps
January 06, 2015 @ 3:20am

Apache Cordova is a hybrid mobile toolset to build Mobile applications using Web Technologies like HTML5, CSS and JavaScript. Microsoft recently released a preview of its toolset for building Cordova applications with Visual Studio. In this article Rick takes a look at the Visual Studio Tools for Apache Cordova for building, debugging and running iOS mobile applications from Windows by way of an example that takes an existing mobile Web AlbumViewer app and porting it to Cordova.

10 comments
INSTALL_FAILED_VERSION_DOWNGRADE: Watch your Android App Version
January 02, 2015 @ 3:24pm

Ran into a nasty problem with an Android app install today and was unable to get the app to install on the device for debugging. Got an INSTALL_FAILED_VERSION_DOWNGRADE after a bunch of false starts it turns out this problem had an easy solution for me.

Gotcha: Entity Framework gets slow in long Iteration Loops
December 21, 2014 @ 4:55am

I've been running into a common issue with Entity Framework where using a dbContext through many context operations can drastically slow down Entity Framework performance. Here's a quick overview of the problem and how to work around it with a few minor tweaks.

15 comments
Mixing $http Promises and $q Promises for cached Data
December 10, 2014 @ 4:35pm

When creating services it's often useful to return data from the $http service, or cached data that already exists. You can't however just return the cached data, but have to turn it into a promise so it matches the $http callback signature. Here's how to deal with this frequent scenario.

5 comments
Creating multi-target NuGet Packages with vNext
December 02, 2014 @ 1:10am

The ASP.NET vNext Platform makes it much easier to create multi-targeted NuGet packages, through support of multiple build targets from a single project and the ability to compile project output directly to a NuGet package.

3 comments
Updating Assembly Redirects with NuGet
November 29, 2014 @ 1:19am

There's little known NuGet command that allows you to re-create assembly redirects for all NuGet packages in your project or an entire solution.

3 comments
WebClient and GetWebResponse not firing on Async Requests
November 25, 2014 @ 5:15pm

Ran into an unexpected behavior when implementing an async version of WebClient to download data. While you can override WebClient to capture the HttpWebResponse object to capture additional Http information that is missing from the WebClient class, I initially had problems captureing the Respone on async requests. In this post I discuss a use case, problem and the simple solution.

AngularJs and Promises with the $http Service
October 24, 2014 @ 9:25pm

The AngularJs $http object returns custom promises which can be surprising when you try to work with them. You can use either .then() or the easier .success() and .error() methods - at the cost of some inconsistency in Promise usage as these extension are specific to the $http functions. In this post I review a few different ways you can use promises and more importantly what the various $http methods return.

5 comments
A jquery-watch Plug-in for watching CSS styles and Attributes
October 20, 2014 @ 3:42am

A few years back I wrote about a jquery-watch plugin I wrote that can monitor CSS property and Attribute changes and let you get notified if one of the monitored properties are changed. Unfortunately the plugin broke a while back as browser and jQuery dropped some older APIs. In this post I describe an update to the jquery-watch plugin using the newer and more widely supported MutationObserver API that brings high performance DOM node monitoring.

6 comments
Chrome DevTools Debugging Issues
October 08, 2014 @ 11:02pm

I've run into a nasty Chrome bug that I can't resolve: My debugger is frequently not stopping on debugger commands or breakpoints set in the debugger.

11 comments
Capturing Performance Counter Data for a Process by Process Id
September 27, 2014 @ 3:36am

Process specific Performance Counters in .NET work directly only with Process Names, not Process Ids which can be problematic if you need to monitor performance of multiple instances of the same process. In this post I describe how you can capture multiple processes uniquely and monitor each individually.

2 comments
A .NET QueryString and Form Data Parser
September 08, 2014 @ 10:28am

.NET is a bit short when it comes to tools that can manipulate UrlEncoded data. If you need to read, create or modify raw querystrings or form data outside of ASP.NET's System.Web context there isn't a clean way to do this and even there if you want to modify url encoded data you'll need to write some code. This article describes a UrlEncodingParser class that lets you read in raw query strings, form data or entire URLs, then lets read, add and update values and then write the values back out. Makes you wonder why that functionality doesn't exist natively somewhere in .NET, eh? Code and samples are provided.

2 comments
The broken Promise of the Mobile Web
August 18, 2014 @ 11:00am

The Mobile Web has come a long way to provide the abillity to create rich UI and interactive, immersive and smooth Web based mobile applications. But there are still big gaps between mobile device features and what's available to Web developers when interacting with mobile devices. In this post I cover and contrast what's wrong with mobile Web development today and where I hope we are going, going forward.

9 comments
Using FiddlerCore to capture HTTP Requests with .NET
July 29, 2014 @ 2:03am

If you have an application that needs to capture HTTP or monitor HTTP traffic, FiddlerCore is the tool you can use to do it easily. In this post I demonstrate how easy it is to integrate FiddlerCore into an application to capture HTTP requests and save the data, as well as discuss how to deal with configuring FiddlerCore for SSL Certificate installation for HTTPS captures.

11 comments
West Wind WebSurge - an easy way to Load Test Web Applications
July 15, 2014 @ 2:06am

Recently I had a need for a load testing tool and after quite a bit of frustration to find a decent reasonably priced load testing tool, ended up giving up searching and building one instead. In this post I introduce West Wind WebSurge, an easy to use Web load testing tool that makes it easy to stress test Web applications.

11 comments
Project Navigation and File Nesting in ASP.NET MVC Projects
June 30, 2014 @ 10:28pm

Project navigation in large projects can be a pain as you have to sift through large amounts of files. I found myself re-organizing projects in a few different ways to make project navigation easier. In this blog post I share a few different approaches as well as some useful tooling to improve my daily workflow.

14 comments
Nuget Dependencies and latest Versions
June 19, 2014 @ 5:52pm

NuGet is a great component distribution mechanism and it's awesome for consuming components and getting them into projects. However, creating NuGet packages and getting the version dependencies worked out reliably has been a challenge. Specifically the way dependency versions are pulled in by NuGet are somewhat counterintuitive. In this post I look at some of the issues and bring up some thoughts of how this could work better.

7 comments
A dynamic RequireSsl Attribute for ASP.NET MVC
June 18, 2014 @ 1:37am

In ASP.NET MVC the RequireHttps attribute allows for securing controllers and controller methods, but it's limited to either on or off statically. In this post I discuss a custom attribute that can dynamically set SSL usage based on a configuration setting or delegate.

8 comments
AngularJs ng-cloak Problems on large Pages
June 02, 2014 @ 4:38pm

Angular supports the ng-cloak directive to address hiding initially unrendered template content. I found out the hard way that sometimes with very large pages this mechanism doesn't quite work and still results in slight page flicker of the unrendered template content. In this post I describe the problem and several easy solutions to get around it the edge case scenario.

9 comments
Creating ASP.NET MVC Negotiated Content Results
May 20, 2014 @ 9:13pm

ASP.NET MVC doesn't directly support content negotiation, but with a little bit of work it's very straight forward to implement a NegotiatedContent ActionResult that can switch its response type based on the Accept header.

8 comments
Filtering List Data with a jQuery-searchFilter Plugin
May 12, 2014 @ 12:48pm

When dealing with HTML based list data, filtering that data based on search text is a nice UI feature that's very useful for quickly finding what you're looking for. In this post I show you how to can create this nice UI effect with a few lines of jQuery code, and then provide a jQuery plug-in that simplifies the process further.

11 comments
IIS SSL Certificate Renewal Pain
May 08, 2014 @ 1:53pm

IIS SSL Certificate renewals always seem to be a pain. Rarely does it just go right and I never seem to remember whether I should renew, or just issue a new cert. The answer is the latter, but this post discusses some of the issues and how to avoid them when renewing or installing new SSL certificates.

10 comments
Westwind Application Configuration Updates
April 29, 2014 @ 3:33am

I've recently updated my code-first, class based application configuration library with a number of features and updates. This blog post discusses some of the changes and new features of this useful library.

2 comments
Updated ASP.NET Database Resource Provider
March 31, 2014 @ 5:53pm

I've updated my database ASP.NET Resource Provider project into a more formal project with a new home page, and official GitHub repository for the source code as well as a getting started video. In this video I talk about what's new and a few examples on how to use the provider.

11 comments
Auto Selecting Cultures for Localization in ASP.NET
March 27, 2014 @ 5:11am

When creating multi-language Web sites, one of the key issues you need to deal with is how to assign a culture to display the appropriate resources. Whether you need to auto-switch locales based on browser language, or explicitly assign a locale based on user preferences there is generally some code logic involved in making these decisions. In this post I show what options are available and a small helper that simplifies setting the culture in ASP.NET applications.

3 comments
Using CSS Transitions to SlideUp and SlideDown
February 22, 2014 @ 2:48am

CSS Transitions are a nice way to replace jQuery animations with smoother counterparts. Some transitions however, like height and width transitions can be tricky to handle with pure CSS code due to container sizing issues. In this post I show how create create transitions to mimic most of jQuery's slideUp() and slideDown() functions using CSS and small jQuery plug-in.

5 comments
Forms Auth loginUrl not working after Windows Update?
February 15, 2014 @ 3:15am

Ran into a problem with Windows Update last week that seems to have broken forms authentication and the loginUrl attribute when set. Looks like new default settings are changing default behavior, and an extra configuration key is required to get the old default behavior back.

4 comments
Using .NET HttpClient to capture partial Responses
January 29, 2014 @ 5:50pm

Recently I needed to create a high volume monitoring application that retrieves a huge number of HTTP requests, and I need to minimize the amount of data pulled from these requests. In this post I describe some of the limitations in actually pulling an exact amount of data from an HTTP and Tcp/IP connection in .NET.

13 comments
Book Review: Async JavaScript
January 09, 2014 @ 4:58pm

This is a brief review of the Aysync JavaScript book by Trevor Burnham. It's great, small book that's easy to read and get through, that blazes through various Async concepts in a really easy to understand and practical way. Great read and highly recommended.

JavaScript JSON Date Parsing and real Dates
January 06, 2014 @ 10:52am

JavaScript doesn't have a date literal, and for this reason JSON serializes dates as strings rather than real JavaScript dates. In this post I show how JSON date serialization works, a few approaches how you can manage dates and how to automate the process of converting JSON dates to 'real' dates more easily.

10 comments
Entity Framework and slow bulk INSERTs
December 22, 2013 @ 10:30am

While inserting a large number of records into a SQL database using EF Code First, I ran into some stunningly slow performance. In this article I show the problem and a couple of simple workarounds to this issue.

13 comments
Dell XPS 15 review
December 19, 2013 @ 3:36am

I recently picked up new Dell XPS 15 to replace an older XPS machine. Lots of things to like about this machine - here's a quick review of what I liked and didn't.

19 comments
Accepting Raw Request Body Content with ASP.NET Web API
December 13, 2013 @ 3:35am

One ASP.NET Web API related question that frequently comes up frequently is how to capture the raw request content to a simple parameter on a controller method. Turns out that's not as easy as it should be. In this post I discuss how to natively capture the raw request content and then create a [NakedBody] attribute that makes it easy capture the raw content in a string or byte[] parameter.

15 comments
Re-examining ASP.NET and Helios Performance Tests
December 09, 2013 @ 2:17pm

Spend a little time over the weekend re-running some of my ASP.NET raw throughput benchmarks on my new machine and found some interesting results. Much faster, but also some surprises with self-hosting and efficiency surprises with various Web API approaches.

6 comments
Checking out the Helios IIS Owin Web Server Host
November 23, 2013 @ 8:42pm

During last week's MVP summit Microsoft showed a new light weight, Owin host called Helios, that can run directly on the IIS core without using the ASP.NET Runtime. It's light weight and fast, and offers a glimpse into where Microsoft is heading for building a more nimble and componentized runtime that is bound to be more flexible and agile. In this post I describe how to set up Helios to play around with and some of the implications it brings.

16 comments
Visual Studio 2013 'Could not evaluate Expression' Debugger Abnormality
November 21, 2013 @ 11:12am

Ran into an oddball debugger issue last week with an older project in Visual Studio 2013 where all breakpoints show 'Could not evaluate expression' instead of displaying values. This post shows the problem and a couple of ways around it.

24 comments
Routes, Extensionless Paths and UrlEncoding in ASP.NET
November 14, 2013 @ 8:13pm

When using custom routing in your ASP.NET applications be careful with encoding routes into paths. Specifically make sure that embedded route paths are properly encoded and that you watch out for a few gotchas related to path encoding. This post demonstrates how to set up routes for a WebForms app and demonstrates a couple of potential problems of manual route encodings and the fixes.

5 comments
Dynamically loading Assemblies to reduce Runtime Dependencies
November 12, 2013 @ 4:05am

Using a static language like C# tends to work with hard assembly bindings for everything. But what if you want only want to provide an assembly optionally, if the functionality is actually used by the user? In this article I discuss a scenario where dynamic loading and activation made sense for me and show the code required to activate and use components loaded at runtime using Reflection and dynamic in combination.

2 comments
Modern/Metro Internet Explorer: What were they thinking???
November 04, 2013 @ 2:19am

The 'Modern' version of Internet Explorer in Windows 8/8.1 is a full screen version Internet Explorer with a custom shell around it. This version of IE has a couple of pretty annoying quirks that affect Web pages significantly.

5 comments
Routing to a Controller with no View in Angular
October 15, 2013 @ 1:56pm

Angular provides a nice routing, and controller to view model that makes it easy to create sophisticated JavaScript views fairly easily. But Angular's views are destroyed and re-rendered each time they are activated - what if you need to work with a persisted view that's too expensive to re-render? Here's how to build a headless controller that doesn't render a view through Angular, but rather manages the the view or markup manually.

4 comments
Prefilling an SMS on Mobile Devices with the sms: Uri Scheme
October 09, 2013 @ 10:04am

Popping up the native SMS app from a mobile HTML Web page is a nice feature that allows you to pre-fill info into a text for sending by a user of your mobile site. The syntax is a bit tricky due to some device inconsistencies, but here's how to do it.

14 comments
Use IIS Application Initialization for keeping ASP.NET Apps alive
October 02, 2013 @ 1:42pm

Ever want to run a service-like, always-on application inside of ASP.NET instead of creating a Windows Service or running a Console application? Need to make sure that your ASP.NET application is always running and comes up immediately after an Application Pool restart even if nobody hits your site? The IIS Application Initialization Module provides this functionality in IIS 7 and later, making it much easier to create always-on ASP.NET applications that can act like a service.

28 comments
Disable User Account Control On Windows 8
October 01, 2013 @ 9:09pm

User Account Control can be a real pain and in Windows 8 there's no easy way to turn it off. However, using Group Policy you can still completely disable it if you decide to do so. Here's how.

8 comments
Hosting SignalR under SSL/https
September 23, 2013 @ 2:55am

Self-hosting SignalR is easy enough, but using a self hosted server under SSL/HTTPS requires a little extra configuration. This post shows what you need to know.

6 comments
JavaScript Arrays, References and Databinding in Angular
September 16, 2013 @ 2:52pm

Ran into a snag with Angular Databinding where items added to an array $scope variable were not 'overwriting' other array elements. Turns out this isn't an Angular issue, but a JavaScript referencing issue, that can be easy to miss when using data binging.

Self-Hosting SignalR in a Windows Service
September 04, 2013 @ 4:54pm

Being able to Self-Host SignalR in standalone applications on the server side opens up all sorts of opportunities for dashboard and notification style applications. In this post I show an example of a Windows Service that integrates SignalR to provide real time status updates and describe the required pieces in detail.

16 comments
The Search Engine Developer
August 24, 2013 @ 3:33am

Today's Search Engines make developers much more productive thanin the past with untold mountains of developer content at our fingertips. But are we getting lazy because of it, using the search engine as a crutch and losing our edge as developers?

20 comments
IIS Default Documents vs. ASP.NET MVC Routes
August 15, 2013 @ 8:38pm

ASP.NET MVC's routing takes over extensionless URLs and if you want to serve static default document using IIS's default settings you need to make sure you ignore the default route.

5 comments
Rendering ASP.NET MVC Razor Views outside of MVC revisited
July 15, 2013 @ 1:48pm

Rendering ASP.NET MVC Views outside of the context of MVC can be immensely useful for various administration, error and logging tasks. Luckily there are some easy ways to render MVC even outside of an MVC controller. Here's some information on how to make that happen.

11 comments
HTML5 and CSS3 Editing in Windows Live Writer
July 08, 2013 @ 10:28am

Windows Live Write is an excellent tool for editing, managing and publishing blog posts effectively. It includes a nice WYSIWYG editor for editing posts which can work off your blog's CSS styling. Unfortunately Live Writer does not use CSS3 or HTML5 as it's stuck using the IE 7 engine for rendering its live preview and editing mode. Here's a workaround to get Live Writer to render your blog theme using HTML5 and CSS3.

3 comments
Using HTML 5 SessionState to save rendered Page Content
July 01, 2013 @ 3:46pm

SessionStorage and LocalStorage provide easy client side storage for Web applications. In this post I describe a specific scenario for caching list display data and state for a server rendered HTML application using sessionState. See how you can make a server rendered HTML application more user friendly and faster caching content on the client and redisplaying it when the user returns to a page he navigated from.

3 comments
Fixing a SkyDrive Sync Disaster
June 21, 2013 @ 8:27am

Recently I ran into a major sync problem with SkyDrive, where SkyDrive decided to update my synced folders with older data from the server, overwriting newer local files. After mangling thousands of files I ended up creating a small utility that lets me look and update these files in bulk. This post discusses the issues and provides a utility to facilitate fixing the problem.

11 comments
Replacing jQuery.live() with jQuery.on()
June 12, 2013 @ 11:40am

In jQuery 1.9 and later the jQuery.live() function has finally been removed which has caused me a bit of upgrade trouble. While jQuery.live() has been deprecated for a while now since 1.7, 1.9 actually removes the function. In this post I describe how you can use the .on() function to replace existing .live() code with a little bit of extra work.

6 comments
Setting up and using Bing Translate API Service for Machine Translation
June 06, 2013 @ 2:52am

Public translation APIs as a Web Service are great for doing machine translation within applications or casual translation for user input in many applications. With Google recently removing Google Translate API I've been looking at alternatives and so wanted to hook up to the still supported Bing Translate API. Unfortunately the signup process for the Translate API is terrible, although using the service is easy enough once signed up. In this post I discuss step by step how to sign up and how to use the Translate API.

4 comments
Smoothing out <div> scrolling in Mobile WebKit Browsers
June 01, 2013 @ 6:13pm

Webkit mobile browser's default scroll behavior is terrible. Default scrolling is slow and it chokes on larger lists becoming erratic or appearing to lock up altogether. Luckily there's an easy workaround using the -webkit-overflow-scroll style, but it too comes with a few caveats. Here's more info.

7 comments
A first look at SignalR
May 22, 2013 @ 5:23am

Last month I finally had a chance to use SignalR in a live project for the first time, and I've been impressed by what this technology offers to .NET developers. It's easy to use and provides rich real-time two way messaging between client and server applications, as well as the ability to broadcast message to all connected clients. This is technology that offers many opportunities to rethink of what we can build with Web applications.

19 comments
Publish Individual Files to your Server in Visual Studio 2012.2
May 10, 2013 @ 2:29am

Visual Studio 2012 Update 2 introduces a little known new Web Publish feature that allows publishing individual files to the server. While not a high frequency usage case, it's handy for content files or when you just published a large project and realized you forgot to include a file in the project to publish.

15 comments
A WebAPI Basic Authentication MessageHandler
April 30, 2013 @ 3:29am

In my last post I showed how to create a basic authentication filter for custom authentication within your applications. This time I repeat the excercise with a MessageHandler to demonstrate the differences between the two approaches.

12 comments
A WebAPI Basic Authentication Authorization Filter
April 18, 2013 @ 11:35am

Recently I needed to implement user based security in a Web API application that's easily accessible from a variety of clients. The customer asked specifically for Basic Auth support and so needed to implement custom Basic Auth support. In this post I describe a simple AuthorizationFilter based implementation of Basic Authentication for Web API.

24 comments
WebAPI: Getting Headers, QueryString and Cookie Values
April 15, 2013 @ 3:48am

Finally got tired to trying to remember how to get at the Headers, Cookies and QueryString 'collections' in Web API, since there's zero consistency and messy nested collections to deal with. Here's are a set of extension methods that make it easier.

9 comments
UNC Drive Mapping Failures: Network name cannot be found
April 04, 2013 @ 11:58pm

Ran into a nasty issue yesterday trying to map a remote drive via UNC pathing. Basically I was unable to connect with failures occurring instantly and without prompting for credentials even when asking to use different credentials. Turns out the problem is the Network Provider Order - here's more info.

9 comments
A small, intra-app Object to String Serializer
April 01, 2013 @ 2:41am

On a few occasions I've needed a very compact serializer for small and simple, flat object serialization, typically for storage in Cookies or a FormsAuthentication ticket in ASP.NET. XML and JSON serialization are too verbose for those scenarios so a simple property serializer that strings together the values was needed. Originally I did this by hand, but here is a class that automates the process.

3 comments
Experimenting with Online Backups
March 27, 2013 @ 2:07pm

I recently spent a bit of time looking at online synching/backup software to provide a little more resilience to my backup situation. Lots of choices but nothing that's really quite perfect yet. Here's what I found.

19 comments
Firing an Entity Framework Database Initializer from within DbContext
March 26, 2013 @ 12:53pm

Database initializers in Entity Framework can be a pain, especially when you're using EF as part of smaller components that may or may not load into a database shared with other EF Contexts. Here's a small helper utility that lets you internalize the database initializer and fire it the first time the context is loaded.

5 comments