SIMULATE "APPLICATION_START" IN CLASS LIBRARY

In the past, if you needed to run startup code in a class library, you included a method call in the "Application_Start" of the Global.asax file. Thankfully, .NET 4.0 has made things easier with the PreApplicationStartMethodAttribute! This helpful attribute allows us to hand-pick code to execute when the application starts without ever modifying the Global.asax file, or messier yet, creating an HttpHandler.

Let's see it in action!

[continue reading]

Simulate "Application_Start" in Class Library
12.30.2013 ~ 12:37 AM
posted in professional
tagged in asp-net : c#
comments [2]

 

HAVE YOU BEEN NAUGHTY OR NICE?!

Ho, Ho, Ho! For this year’s company Christmas card, my place of work (Williams-Forrest) decided to make a fun little site that decides whether or not you’ve been Naughty or Nice.

[continue reading]

Have you been Naughty or Nice?!
12.17.2013 ~ 11:03 AM
posted in professional
tagged in christmas : mvc : facebook

 

INTRODUCING "SCHEDULEMAGIC" A SIMPLE TASK SCHEDULER FOR ASP.NET

Creating background tasks in .NET has always been a bit of a pain. You want to create something localized to your project solution that doesn't have to deal with scheduled tasks or other kinds of tomfoolery. Well, thankfully, those days are far behind us! All we need is a little... magic!

[continue reading]

Introducing "ScheduleMagic" A Simple Task Scheduler for ASP.NET
12.03.2013 ~ 02:21 PM
posted in professional
tagged in scheduled-tasks : c# : asp-net
comments [0]

 

SIMULATE "APPLICATION_START" IN SHAREPOINT

If you've worked within a SharePoint project, you may have noticed the absense of the "Global.asax" file. The SharePoint infrastructure doesn't include this file, so all methods within it, including the "Application_Start", are also unavailable. However, with some tricky maneuvering, we are able to simulate it.

[continue reading]

Simulate "Application_Start" in Sharepoint
11.25.2013 ~ 03:30 PM
posted in professional
tagged in sharepoint : c# : asp-net
comments [0]

 

ORCHARD CMS - ERRORS WHEN PUSHING CHANGES IN THE MIGRATIONS FILE

I really love the Orchard CMS (the CMS engine built upon the .NET MVC Framework), but it isn't without its quirks. I've found that often times, when I try to delete a column from an existing table in the migrations file, the site inexplicably starts throwing errors. After digging through the error log, I found that the error usually is along the following lines:

Error when updating module: "A tenant could not be started: Default NHibernate.PropertyNotFoundException: Could not find a getter for property '{property}' in class '{className}'" 

Basically, even though the column was deleted in the migrations file, Orchard is still looking for that column.

[continue reading]

Orchard CMS - Errors When Pushing Changes in the Migrations File
02.07.2013 ~ 04:57 PM
posted in professional
tagged in c# : asp-net : orchard : orchard-cms
comments [0]