Going "dark"

January 23, 2010 · 1 min read

I'm currently in the process of moving so from the weekend of January 23rd through as fast as I can move, I'll have limited internet access.

I'll use the free time to create a proper sample project to include all the ideas stirred in the outline I made here: Upcoming ASP.NET MVC posts. I'll try to write up as much as I can from various wifi spots with the intention of getting the bulk of it out within the next week. I'm tired of this being on my To-Do list but moving does have the higher priority at the moment.

Let the withdrawal begin.

Upcoming ASP.NET MVC posts

January 20, 2010 · 1 min read

Most of this may or may not be relevant to your situation but after completing development, staging, and most of the production implementation of an ASP.NET MVC site I wanted to share some of what I learned.

The majority are one or two-off hacks from someone else's code or a down/upgrade where appropriate, creating a Frankenstein. These won't necessarily be in order I don't think.

  • Homepage - various jQuery plugins & content fetching
  • Content/ structure
  • Elmah

    • Code version: 1.1.11517.2009
    • Downgraded ELMAH_LogError stored procedure to SQL 2000
    • ELMAH_LogError pruning taken from 2 blog posts from a single source
  • Editing 1:1, 1:M or M:M in Entity Framework
  • Validation with xVal and DataAnnotations - straight up from the samples
  • Image/Link/CSS/JScriptHelpers - using tagbuilder to eliminate a lot of code in markup
  • jQuery uses

    • Delete links - tweak of an Http Delete implementation
    • Ajaxy Http Post/Gets
    • Image rollover
    • Google analytics
    • TinyMCE
  • Areas

    • Views/Web.config copied from main project
    • T4MVCAdmin fork to handle Links and Controller references (that is now quite old)
  • SQL 2000 from 2005

    • nvarchar(max) to nvarchar(4000) - ntext is more of a 1:1 mapping but it meant significant stored proc changes
    • using SqlPubWiz
  • MsBuild scripts - dependency chaining, SqlPubWiz integration via Community Tasks, etc.

    • Database
    • Web

I'll try to refer to this verbatim as my defacto outline and even that isn't quite structured correctly enough. It'll work itself out as the posts are made I'm sure. I'm using this to hopefully keep me motivated to completing them all.

ASP.NET MVC and CreateArea Extension Method on Restricted Hosting

January 19, 2010 · 1 min read

I've recently switched hosting providers at the company I work for. Instead of being able to use wildcard mapping or the .mvc file extension mapping, I'm left with .aspx.

The premise of this exercise is easily explained here: http://www.asp.net/learn/mvc/tutorial-08-cs.aspx, specifically Listing #3 under the Hosted Server section.

While this is fine for a default MVC1 project, I've currently implemented Phil Haack's Areas v1 prototype with Steve Sanderson's CreateArea extension method located here http://blog.codeville.net/2008/11/05/app-areas-in-aspnet-mvc-take-2/.

To make the Global.asax change from Listing #3 in the first link (phew), you need to modify all routes to add the .aspx extension. The same goes true for .mvc.

I followed Steve's example verbatim and eliminated the default "" (blank) route because isn't necessary in wildcard mapping. What isn't readily apparent is that you absolutely need this when you do get into file extensions.

The fix is a simple but because it felt like the same route/area I didn't think it would work.

routes.CreateArea("Root", "Namespace.Controllers",
    routes.MapRoute(null, string.Empty,
    new { controller = "Home", action = "Index", id = string.Empty })
);

RouteDebug confirmed it gets hit properly so that should be all you need. I haven't tested to see whether you can just add this route and leave it for both file extension and wildcard mapping but it shouldn't be a problem to just add it and leave it.

Get in your Home

January 18, 2010 · 2 min read

I created this site as a personal outlet not tied to a specific entity. While I do have a blog I intend to keep at geekswithblogs.net, I wanted a little more creative freedom over the content. I was not censored in any way by the administration of geekswithblogs.net, but users had very strong opinions about what content should go on the home page or just about any content for that matter. I may be a geek but there are no rules that said I had to keep the content technical only.


As a Christian, I also wanted a place where I could freely post my opinion without feeling like I have to cater to the people that find that offensive.If I write something about Jesus Christ and that offends you then you have two options 1) Ignore that post (it seems simple when you look for tags or categories) or 2) Ignore me entirely. I do my best not to be overly preachy but I'm very quick to determine when I'm being preached to. If you have a problem and your response is some form of soap box preaching in a hypocritical tirade then chances are I'm going to think you're a complete waste of my time. All I'm asking for is the same measure of respect I feel I'm giving and that should easily be visible to anyone that comes here. If it isn't then please don't hesitate to let me know. I don't like being known as a hypocritical douche.


As I assess my current personal situation I've realized that I walk on eggshells around *everyone* whether I want to or not. It has always felt like "my nature" but I absolutely will not do that here nor do I expect it from anyone. If you feel like you have to be sensitive around me then please talk to me about it. I really do strive to be as good as I can be in every aspect of my life and if something is faulting, I would like to know.

In the end, I have nothing but love for everyone and most everything in this life. I'm truly blessed to simply breathe air, walk upright, and be able to speak relatively clearly because I could be far worse off. I'm lucky to still have a mind that functions or the ability to create something from nothing, even if it is only electronically. I feel truly fortunate to be part of the gift of life and I'm trying my best not to spoil the party for everyone. I am still human though so my chances of making another mistake before I die is 100%.

IT'S HEREING!!!!

January 18, 2010 · 1 min read

Technically it's still comming!!! but I wanted my first post to officially thank Richard Dodsworth aka "Conkerjo" of Sgt. Conker for letting me host my blog and domain on his equipment. Without such a generous gesture, none of this would be possible.

I also wanted to take the time to pimp Sgt. Conker for its XNA goodness as I play a very small roll in keeping it together. There are a number of admins on the back-end in addition to Conkerjo, like Björn Graf (boki), Catalin Zima (CatalinZ), (Cryovat), Casey Young (ElementCy), and Michael Coles (X-Tatic). It is following the tradition of ziggyware.com in trying to be a great aggregate of XNA information and I must say it is doing a great job for a site that is primarily user-driven. If you've contributed to a ziggyware article in the past and would like that content on Sgt. Conker, or would just like to contribute something new, send an email to articles@sgtconker.com. To be clear, Sgt. Conker isn't trying to 1up or replace ziggyware outright but we're trying to capture as much of the great content that is still relevant.