How do you deploy SQL Server Management Objects (SMO) runtime? Follow this 3 step process for success.
STEP 1: Download and Install Microsoft Core XML Services (MSXML) 6.0
STEP 2: Download and Install Microsoft SQL Server Native Client
STEP 3: Download and Install Microsoft SQL Server 2005 Management Objects Collection
The links above point to the X86 framework however at the time of writing the Feature Pack for Microsoft SQL Server 2005 - February 2007 was the latest and had links to the various processor architectures that are supported by Microsoft
I guess the next logical step is to find out what the differences will be between SQL Server 2005 and SQL Server 2008 seeing as its release is imminent. That being said my total time invested in Microsoft’s latest database technology has been zero.
While I am deviating. Am I the only one not really concerned with SQL Server 2008’s launch?
Deployment, SMO, SQL Server 2005
Today one of my colleagues was working on piece of code that would turn a given mapped drive to full UNC path. The code to do implement the functionality is very simple and can be done in a variety of ways ranging from Win32 API to WMI (via System.Management) Below is a snippet of the code that was used.
1: public static string GetUNCPath(string originalPath)
2: {
3: string returnVal = originalPath;
4: foreach (DriveInfo drive in System.IO.DriveInfo.GetDrives())
5: {
6: if (Path.GetPathRoot(originalPath).ToLower().StartsWith(drive.RootDirectory.FullName.ToLower()))
7: {
8: if (drive.DriveType == DriveType.Network)
9: {
10: System.Management.ManagementObjectSearcher searcher = new System.Management.ManagementObjectSearcher(
11: @"\\.\root\cimv2", "Select * From Win32_LogicalDisk Where DriveType = 4");
12:
13: foreach (System.Management.ManagementObject obj in searcher.Get())
14: {
15: if (obj["DeviceID"].ToString().ToLower().StartsWith(drive.Name.ToLower().Substring(0, 2)))
16: {
17: returnVal = Path.Combine(obj["ProviderName"].ToString(),
18: originalPath.ToLower().Replace(drive.Name.ToLower(), string.Empty));
19: break;
20: }
21: }
22: }
23: else if (drive.DriveType == DriveType.Fixed)
24: {
25: Console.WriteLine("The drive is not a network drive");
26: }
27: break;
28: }
29: }
30: return returnVal;
31: }
This code can easily be tested using Snippet Compiler, a great tool that is pretty much a must have for any developer. I have attached the code file that can be used with snippet compiler all that you will need to do is to change the mapped path that is passed into the method and a reference to System.Management.dll in Snippet Compiler. You can then run the code with UAC turned on with Run As Administrator or just a normal use to see the difference.
When running this code on Windows Vista with UAC turned on and Visual Studio 2005 or 2008 in administrator mode will provide different results. While getting different results is the correct behavior, unless you are fully aware of the various areas that running applications in a secondary login has impact on the notion of running your application in a different user context can cause a lot of wasted hours.
As a general rule when debugging code or running code on a machine that has UAC enabled my advice would be to spend a quick second to check if UAC has a part to play in the puzzle.
.net, Development, Mapped Drive to UNC, Run As Administrator, UAC, Vista, Visual Studio

Despite a few crashes and some issues with Firefox 3 on my Server 2008 development laptop, I upgraded. Here’s to getting that world record.
firefox 3
Estimating time for a work item is at times a fine art, more often than not its based on a combination of Prior Experience and gut feel.
Simon is soon going to be setting free our Point Case Estimation that we have used extremely successfully for over 18 months.
When its available I would suggest that you give it a try. In the mean time Dilbert will supply some laughs
Dilbert, point case estimation, project estimation

The use of plug-ins or add-ins are a common way of extending any application, most people do not even know when they are using an extension.
I am currently using an add-in framework in a project that I am working on and It has proven its self invaluable. The framework I speak of here is baked right into the .net Framework from 3.5, The Managed Add-in Framework being fairly new and has a few glaring issues that need to be addressed like the naming conventions and directory structure that must be adhered to avoid making the entire framework come crashing down.
In order to use the framework easily you will need to download the Pipeline Builder CTP March 2008 which is the latest release at the time of writing, please check the clr addins blog or clr addins homed on codeplex.
While there are annoyances with the state of its development, some of the features you get from using it out of the box are nice. The ability to launch add-ins either cross process or cross domain is great.
The add-in framework uses Adapters on either site of the add-in contract or isolation boundary as proxies. This is some of the magic that also enables efficient version control of the add-ins without the changing or breaking the add-ins.
For Additional information I would strongly recommend checking out these two videos
- Introduction to the Managed Addin Framework
- Version Resilience in the Managed AddIn Framework/
also further reading relating to the Managed Addin Framework or MAF look here.
.net, Addins, extensions, MAF, Managed Addin Framework, Plugins
Now those of you who know me are bound to be give me a lot of flack for what I am about to say, but as always I am gadget/tech geek and as such admire feats of no compromise engineering So here goes I want the new 3G IPhone announced at WWDC 2008.
Check out the commercial that aired during Steve Job’s Keynote
For further details check out Engadget and Crunch Gear
apple, iphone 3g, iphone2, wwdc 2008
The Velocity blog is pimping the following.
Project “Velocity” is a distributed in-memory application cache platform for developing scalable, available, and high-performance applications. “Velocity” fuses memory across multiple computers to give a single unified cache view to applications.
And after listening to the latest Hanselminutes Podcast on Velocity it has me a interested.
I am currently working through the process of evaluating various Distributed Caching Options for the next version of an enterprise app that we are building, Velocity will go on the watch list.
This is something that has been seriously missing for most .net developers. The feature set is still being developed to include Cache Linq as mentioned on the Hanselman Podcast. The current CTP brings the following.
- Caches any serializable CLR object and provides access through simple cache APIs.
- Supports enterprise scale: tens to hundreds of computers.
- Configurable to run as a service accessed over the network or run embedded with the application.
- Supports common cache configurations.
- Supports dynamic scaling by adding new nodes.
- Configurable number of backup copies to provide high availability.
- Automatic load balancing.
- Integration with administration and monitoring tools such as ETW, System Center, etc.
- Provides tight integration with ASP.NET to be able to cache ASP.NET session data in the cache without having to write it to source databases. It can also be used as a cache for application data to be able to cache application data across the entire Web farm.
- Follows the cache-aside architecture (also known as Explicit Caching) for V1. That is, you must decide explicitly which objects to put/remove in your applications and “Velocity” does not synchronize with any source database automatically.
- Support for multiple client languages (for example, PHP, C#, C++, etc.).
Dare has a post on velocity’s finer points. Also check out the Velocity’s MSDN page and download and play with the bits.
.net, Caching, distributed, in memory, Velocity
I have now moved off my old blog, and into markharris.net.au/blog where i intend to stay for a long while.
Till next time.
My good friend Simon says that Microsoft should make BizTalk free and while they are at it make sure they throw all the tools into VS.net
I do agree with him on the fact that BizTalk need to be set free to see the general adoption, However rather than having it fully integrated into the Visual Studio IDE we need something more in the vein of SQL Express. Eventually BizTalk Express will be one of the tools every developer will have in their toolkit.
The interesting aspect will be what parts of BizTalk will they integrate into Visual Studio.
UPDATE: Seeing as we now have a christened the product here is a fancy Logo, maybe even bumper stickers

UPDATE: style fix
Biztalk, BizTalk Express, Visual Studio
I have till the end of the month before the project I have been working on for the last 8 months goes Gold. For the last 2 months we have been in weekly/fortnightly iterations and it has been going extremely well.
However as you may imagine a couple of the newer iterations have not had as much system and integration testing. Added to the fact that its also my first major project that I have been team leading, which has caused me to have a few less hours of sleep a night.
In the last week i have been preparing for Go Live checking and double checking lists, Pacing around the office, Burning the midnight oil just to make sure everything is perfect as can be. I guess the question is “What do most people do just before Go Live?” Do you have any rituals that need to be performed before going live?
Development, Go Live Rituals