Monthly Archives: September 2011

C# : String Extension to Parse Enums

It seems to me that there is too much typing involved in parsing a string as an Enum type. Here’s a quick string extension method to turn it into a simpler one liner: public static T EnumParse<T>(this string input, bool … Continue reading

Posted in C# | Leave a comment

IT Toolbox: TechNet Magazine September 2011

The September IT Toolbox column is up on the TechNet Magazine website. This month I covered these two products: Lansweeper: Hardware, software, and device inventory management ipMonitor: Detailed monitoring of your servers, systems, and network devices. Check it out and … Continue reading

Posted in Microsoft TechNet | Leave a comment

ASP.Net: App_Offline.htm as a Maintenance Page

While Googling about, I came upon an oldy-but-goody, that apparently has been available since the release of ASP.Net 2.0: App_Offline.htm. An undocumented feature, you can copy a file called app_offline.htm into the root of your .Net website and the application … Continue reading

Posted in ASP.Net, IIS, MVC | Leave a comment

SSIS: Use Two OLE DB Destination Adapters to Catch Insertion/Constraint Errors

If you are using SQL Server Integration Server (SSIS) packages to insert large volumes of data, you have undoubtedly encountered incorrectly formatted or typed data in your data source including precision errors, conversion errors, and primary key/foreign key constraint errors etc. To … Continue reading

Posted in MS SQL Server, SSIS | 3 Comments

JavaScript: Extending String to Have startsWith and endWith Functions

Here’s two prototype functions you can add to your JavaScript to give you “startsWith” and “endsWith” functions: if (!String.prototype.startsWith) { String.prototype.startsWith = function (str) { return this.slice(0, str.length) == str; }; }   if (!String.prototype.endsWith) { String.prototype.endsWith = function(str) { … Continue reading

Posted in JavaScript | Leave a comment

ASP.Net MVC: Partially Secured Sites / Switching from HTTPS back to HTTP

Most sites out there have some portions that should be only served via HTTPS, while the remainder can be HTTP, such as account pages and content pages respectively.  This is sometimes called a “partially secured site.” Starting with MVC 2, … Continue reading

Posted in ASP.Net, C#, MVC | 2 Comments