Archive for June, 2008

Deploying SMO client runtime

June 30th, 2008

How do you deploy SQL Server Management Objects (SMO) runtime?   Follow this 3 step process for success.

STEP 1:  

STEP 2:  

STEP 3:

The links above point to the X86 framework however at the time of writing the 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?

Technorati Tags: ,,

Vista UAC Visual Studio and Run As Administrator Gotcha’s

June 24th, 2008

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 , 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.

Huzzaah

June 18th, 2008

mozillacertificate

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.

Technorati Tags: ,

How do you estimate your projects

June 15th, 2008

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 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

 Estimation

Plug-in, Add-in and Extension’s – The Managed Addin Framework

June 15th, 2008

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 which is the latest release at the time of writing, please check the or .

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.

 

image

For Additional information I would strongly recommend checking out these two videos

also further reading relating to the or MAF look here.

Turncoat I hear you say…

June 10th, 2008

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 .

Check out the commercial that aired during Steve Job’s Keynote

 

 

For further details check out and

Technorati Tags: ,,,

Velocity – Distributed Caching the Microsoft Implementation

June 9th, 2008

The 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   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 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 Also check out the and download and play with the bits.