Skip to main content


Showing posts from 2007

HDD and Thumb Drive Performance Comparison

So, since I tend to be a speed freak of sorts, I wanted to see just how well, or not, my storage devices perform. In my Dell Precision M90 laptop, I've got a Seagate - Momentus 100GB drive, then a Western Digital Passport 250GB USB external drive, and finally a PNY Attaché 16GB USB thumb drive.

The following are the screen shots from HD Tune that indicate how each performed:

All in all, I'm fairly pleased. My primary desire is to simply have capacity. But when you start storing GB sized database files and virtual machines, better performance can mean a lot!

Automatic Updating of AssemblyFileVersion in C# Projects

So my good buddy and co-worker Stacy Draper and I put together a solution today to handle versioning of .NET assemblies used for SharePoint web part development. Maybe this has been done before, maybe even better than this, but a quick Google search didn't turn up squat for us, or at least anything we liked, so we created our own solution.

The general problem revolves around the fact that the AssemblyVersion attribute in .NET assemblies is used by other assemblies when referencing strong named/signed assemblies stored in the GAC. Now you don't have to put your SharePoint assemblies in the GAC, but in most all cases, it simply makes the most sense. If you change the AssemblyVersion of an already installed and used over and over and over again web part, you're in a world of hurt if you arbitrarily change the AssemblyVersion to something new. At that point, you're faced with having to update 10's to 100's to 1000's of web part pages that reference the origi…

Missing MOSS 2007 Functionality

So having been using MOSS 2007 for the past 3 months now, I figured I'd put my own stake in the ground as to some things that would be quite handy to be built into the product. Yes, there are probably ways to do some custom webparts to handle some of these, but IMHO, these are pieces of functionality that should be part of the base product. Hopefully they make it into the next version...
List View SecurityThis follows some of the same logic behind the use of a database VIEW. An administrator should be able to create a SharePoint list view with a row-level filter and then secure the list of views to the appropriate folks (to the point of hiding views a user doesn't have access to use).
This would allow various business scenarios to be simply handled via view security. For instance
hiding items based on the state/status code of an item to augment workflows
storing heterogeneous content types, but securing which are visible to whom
List Item Column SecurityThis is very similar to …

Programmatically Accessing Excel Data via .NET on 64-bit servers

So it turns out that using ADO.NET to access MS Excel worksheet data in an ASP.NET application running on the 64-bit version of Windows Server 2003 does not quite work as expected. This also goes for any 64-bit .NET code. In short, the Microsoft.Jet.OLEDB.4.0 provider is a 32-bit driver that does not work when directly used by 64-bit code. The following post from a Microsoft employee describes the issue:

Connect to Excel. Using x64 (64-bit) platform. Compiled as x64

"Since there are no 64-bit OleDb drivers for anything other than SQL Server, therefore, we cannot write 64-bit apps which interface with databases directly.

What you need to do is split your application into a 32 bit part and a 64 bit part, use COM interop to cross the 64/32 bit boundary. For instance, drop the code (just a simple class library compiled as 32 bit) that retrieves the Excel data into a COM+ (System.EnterpriseServices) as a "server type" application, and call those server methods from your 64 b…

Using Log4Net in 4 Simple Steps

First off, yes, this is a complete rip-off from this blog post, but with value added in that this represents my personal preference when using log4net. This is a simple four step process of adding logging to an application. I prefer log4net over the MS logging application block, primarily as log4net has zero dependencies and NHibernate already references it. IMHO, if you're doing ANY kind of logging, reference log4net into your project and use it instead of Trace.WriteLine() or Debug.WriteLine().
Step 1. Add the following in the AssemblyInfo.cs[assembly: log4net.Config.XmlConfiguratorAttribute(
ConfigFile = "log4net.xml", Watch = true)]
Step 2. Create the log4net.xml file and add the following to the new fileWith respect to the location of this file and SharePoint, this file can exist in the root of the wss root, next to the relevant web.config file for the given site.In general, this should sit next to the app.config or web.config file for the g…

Potential solutions to the prior mentioned hack about KB928365 and ASP.NET Request Header modification

As "Anonymous" asked about my referenced solutions to the hack to resolve issues with MS KB928365, I figured instead of simply writing a follow-up comment, I would simply create a follow-up post. That said, I can imagine at least two primary solutions to this, each depending on your exact situation.

First off, with regards to my situation, I can create a provider pattern solution for looking up the enterprise provided AUTHID, such that if I want to fake it, my code isn't directly coupled to a value out of the header, but simply an interface that provides an AUTHID. I would then create two separate implementations of the interface. The first implementation would be the DEV simulation implementation, which would read the AUTHID out of the XML configuration file that we are currently using to inject into the request headers (for use in DEV). The second interface implementation would be one that reads the value off of the request headers (for use in PROD). You then confi…

Blogs vs. Articles

I love this post! It's posts like this one that I swear Ayende Rahienand Jeremy Millerare my long lost brothers. Week after week, those two get down in writing what I've been thinking about for quite some time, but until recently, didn't even bother to have a blog to write in myself.

Overall, Nielsen is simply incorrect, much as O'Brien points out. Roughly 10 years ago, as a new college grad, I spent some time in the publishing world as a Technical Editor on a number of articles and two books. I did it, because I thought wow, there could be my name in print. But just doing those few jobs, not even being the author, I quickly came to realize all of the same things Larry points out in his post, so I stopped pursuing the publishing world any further.

Since then, second to a few choice books most folks are aware of, blogs have become the primary source of learning on my end. The amount of posts that I queue up daily in Google Reader as Starred Posts and then read while…

MS KB928365, ASP.NET Request.Headers.Add() Hack No Longer Works

So a project that I am currently a part of is using an ASP.NET 2.0 HttpModule to add some additional values to the incoming HTTP request's headers in the DEV environment (i.e., our local disconnected laptops) to simulate what an enterprise single-sign-on solution is performing in the production environment. It has worked like a charm. That is until I installed the new security update for the .NET Framework 2.0 release this past Wednesday, July 10, MS KB928365.

Apparently this "hack"has been disabled with the release of this security update.

When attempting to call Headers.Add(), with or without the above hack in place, you will now receive a PlatformNotSupported exception.

All in all, this post is by no means a rant against the security update, but simply an attempt to add a quick answer to the "Google answer machine" for those searching. I am also already aware of a number of other potentially better solutions than the one currently in place for simulating th…

Using Multiple iPods on a Single Windows Computer

So I got a new laptop a week ago, and in the process was determined to figure out a better way to sync both my girlfriend Anne's 4GB iPod Nano and my 60GB iPod Photo using the single laptop.

With the last laptop, I created an additional user account to be used just for managing the iTunes library for my iPod. Anytime I needed to sync my iPod, I logged off my "primary" user account and then back in with a "secondary" user account used just for managing my iTunes library. I was convinced that there had to be a better way, but simply hadn't spent the time trying to find it. With the new laptop in hand, I was determined to find out what the answer was.

After Google'n for an answer, I found a number of solutions similar to the following ones:…

It was bound to eventually happen...

...that I would start a blog.

Anyway, I've spent better than the past 5 years now reading other people's blogs, and steering clear of starting my own. I still don't think I have the time to offer a lot of content, but hopefully what I do post will be more useful than this obligatory intro. The only real reason I decided to start this was to give myself somewhere to post write-ups on random topics that I couldn't find an answer to via Google. Hopefully posting those write-ups here will save someone else some time some day.

In the mean time, you can keep yourself busy reading my Google Reader Shared Posts.