Lyle's profileLyle Dodge's SpacePhotosBlogListsMore Tools Help

Lyle Dodge's Space

Lyle Dodge

Occupation
Location
Interests
I’m a consultant for Avanade, leading development of advanced technology demos on bleeding edge Microsoft technology including Windows Azure and the Azure Services Platform, Live Services, Commerce Server 2009, Office 14 and other incubating technologies.

See a profile of our work at http://www.accenture.com/Global/Technology/Microsoft_Solutions/Services/AccAvanadeSolShowcase.htm.


I live in Bloomfield Hills, Michigan with my wife Jaclyn and two American Eskimo dogs, Eskie and Zoe. We are expecting our first son this summer.
May 21

Commerce Server Web Services 500.19 IIS 7 Error 0x800700b7

If you’re getting this, double check that your path in IIS 7 doesn’t have a “\\” anywhere in it.  When you’re setting up your services and sites in the configuration wizards, if you copy / paste a path with a “\” at the end, you’ll get this, and it’s a bit hard to figure out this is what did it unless you walk through your paths and notice it in the IIS 7 management MMC.

IIS 7 CS Error

April 22

Developer Performance Tweaks #1

I’m doing some development with SharePoint, SQL 2008, FAST, Atlas and more lately, and I’ve been doing a lot of work inside of virtual machines.  This is a first in a series of simple tips to tweak your development environment.

Change your Microsoft SQL Server Databases to SIMPLE recovery mode.  Open up SQL Server Management Studio, and execute the following query:

SELECT 'ALTER DATABASE [' + RTRIM([NAME]) + '] SET RECOVERY SIMPLE' FROM SYS.DATABASES WHERE RECOVERY_MODEL_DESC = 'FULL'

This should give you something like:

ALTER DATABASE [model] SET RECOVERY SIMPLE
ALTER DATABASE [ReportServer] SET RECOVERY SIMPLE
ALTER DATABASE [SharePoint_Config] SET RECOVERY SIMPLE
ALTER DATABASE [SharePoint_AdminContent_7796df12-4197-417a-9b3c-1828e09f1cba] SET RECOVERY SIMPLE

Now just run those commands in a new window.

November 12

SSDS REST Library Updated - Now runs in Windows Azure!

Ryan Dunn has just released an update to his SSDS REST Library so that it runs in partial trust.  This means that it now runs in the Windows Azure cloud fabric!  If you've been doing work with the Windows Azure Sql Data Services (SDS), this is the must-have access library to do your work.  Go get it at http://code.msdn.microsoft.com/ssdsrest.

November 05

Using .NET Services in a Windows Azure Hosted Application

If you are planning on using the November CTP of the .NET Services in your Windows Azure host, make sure you merge the relevant sections of the Machine.config that deal with Microsoft.ServiceBus.dll to you Web.config file.  This is needed since the Windows Azure hosts don’t have the November CTP of the .NET Services in the GAC.  I’m happy Microsoft is doing this, since it means they are making the Windows Azure stable, clean and geared towards running their environment in a production fashion well before they even start to open it up for production.  Below are the sections you’ll need to merge.

<configuration>
  <system.serviceModel>
    <bindings>
      <netTcpRelayBinding>
        <binding name="metadataExchangeRelayBinding" />
      </netTcpRelayBinding>
    </bindings>
    <extensions>
      <behaviorExtensions>
        <add name="connectionStatusBehavior" type="Microsoft.ServiceBus.Configuration.ConnectionStatusElement, Microsoft.ServiceBus, Version=0.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="transportClientEndpointBehavior" type="Microsoft.ServiceBus.Configuration.TransportClientEndpointBehaviorElement, Microsoft.ServiceBus, Version=0.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      </behaviorExtensions>
      <bindingElementExtensions>
        <add name="tcpRelayTransport" type="Microsoft.ServiceBus.Configuration.TcpRelayTransportElement, Microsoft.ServiceBus, Version=0.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="httpRelayTransport" type="Microsoft.ServiceBus.Configuration.HttpRelayTransportElement, Microsoft.ServiceBus, Version=0.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="httpsRelayTransport" type="Microsoft.ServiceBus.Configuration.HttpsRelayTransportElement, Microsoft.ServiceBus, Version=0.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="onewayRelayTransport" type="Microsoft.ServiceBus.Configuration.OnewayRelayTransportElement, Microsoft.ServiceBus, Version=0.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      </bindingElementExtensions>
      <bindingExtensions>
        <add name="basicHttpRelayBinding" type="Microsoft.ServiceBus.Configuration.BasicHttpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=0.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="basicHttpRelayContextBinding" type="Microsoft.ServiceBus.Configuration.BasicHttpRelayContextBindingCollectionElement, Microsoft.ServiceBus, Version=0.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="webHttpRelayBinding" type="Microsoft.ServiceBus.Configuration.WebHttpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=0.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="wsHttpRelayBinding" type="Microsoft.ServiceBus.Configuration.WSHttpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=0.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="wsHttpRelayContextBinding" type="Microsoft.ServiceBus.Configuration.WSHttpRelayContextBindingCollectionElement, Microsoft.ServiceBus, Version=0.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="ws2007HttpRelayBinding" type="Microsoft.ServiceBus.Configuration.WS2007HttpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=0.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="ws2007FederationHttpRelayBinding" type="Microsoft.ServiceBus.Configuration.WS2007FederationHttpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=0.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="netTcpRelayBinding" type="Microsoft.ServiceBus.Configuration.NetTcpRelayBindingCollectionElement, Microsoft.ServiceBus, Version=0.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="netTcpRelayContextBinding" type="Microsoft.ServiceBus.Configuration.NetTcpRelayContextBindingCollectionElement, Microsoft.ServiceBus, Version=0.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="netOnewayRelayBinding" type="Microsoft.ServiceBus.Configuration.NetOnewayRelayBindingCollectionElement, Microsoft.ServiceBus, Version=0.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <add name="netEventRelayBinding" type="Microsoft.ServiceBus.Configuration.NetEventRelayBindingCollectionElement, Microsoft.ServiceBus, Version=0.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      </bindingExtensions>
    </extensions>
    <client>
      <endpoint address="" binding="netTcpRelayBinding" bindingConfiguration="metadataExchangeRelayBinding" contract="IMetadataExchange" name="sb" />
      <metadata>
        <policyImporters>
          <extension type="Microsoft.ServiceBus.Description.TcpRelayTransportBindingElementImporter, Microsoft.ServiceBus, Version=0.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
          <extension type="Microsoft.ServiceBus.Description.HttpRelayTransportBindingElementImporter, Microsoft.ServiceBus, Version=0.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
          <extension type="Microsoft.ServiceBus.Description.OnewayRelayTransportBindingElementImporter, Microsoft.ServiceBus, Version=0.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        </policyImporters>
        <wsdlImporters>
          <extension type="Microsoft.ServiceBus.Description.StandardRelayBindingImporter, Microsoft.ServiceBus, Version=0.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
          <extension type="Microsoft.ServiceBus.Description.TcpRelayTransportBindingElementImporter, Microsoft.ServiceBus, Version=0.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
          <extension type="Microsoft.ServiceBus.Description.HttpRelayTransportBindingElementImporter, Microsoft.ServiceBus, Version=0.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
          <extension type="Microsoft.ServiceBus.Description.OnewayRelayTransportBindingElementImporter, Microsoft.ServiceBus, Version=0.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        </wsdlImporters>
      </metadata>
    </client>
  </system.serviceModel>
</configuration>
October 31

Running Windows Azure Development Fabric with SQL Server instead of SQL Express

If you have SQL Server 2005 or SQL Server 2008 already installed, and you don't want to run SQL Express in addition, create an alias on your computer.  I wrote the instructions below for SQL Server 2008 on Vista x64.

Opening SQL Server Configuration Manager

  1. Open SQL Server Configuration Manager
  2. Click on Start
  3. Click on All Programs
  4. Click on Microsoft SQL Server 2008
  5. Click on Configuration Tools
  6. Click on SQL Server Configuration Manager

Setup SQL Server to use TCP/IP

  1. Expand the SQL Server Network Configuration node
  2. Click on the Protocols for MSSQLSERVER
  3. In the right pane, right-click the Protocol Name TCP/IP and choose Enabled

Add the Aliases

  1. Expand the SQL Server Configuration Manager (Local) node
  2. Expand the SQL Native Client 10.0 Configuration (32 bit) (Also make the same changes for the (64 bit) node)
  3. Click on the Aliases node
  4. Right-click on the right pane and choose New Alias...
  5. Enter the following values:
    1. Alias Name .\SQLEXPRESS
      Port No 1433
      Protocol TCP/IP
      Server .

Your local Azure development fabric will now use your SQL Server 2008 instance.  If you still have problems connecting, also enable and start the SQL Browser Service.

SQL Server Configuration Manager - SQLEXPRESS Alias (64 bit)

September 18

Listen.exe Source Code Request

I received a request for a listen.exe utility I wrote which is useful when you're testing firewall rules, so I'm posting the source code here.

using System;
using Microsoft.VisualBasic;
using System.Net.Sockets;

namespace Listen
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Written by Lyle Dodge (http://lyledodge.spaces.live.com)");
            Console.WriteLine("Redistribute Freely");
            Console.WriteLine();
            try
            {
                if (((args.Length != 1) || !Information.IsNumeric(args[0])) || (Convert.ToInt32(args[0]) < 2))
                {
                    Console.WriteLine("Usage: listen [port number]");
                }
                else
                {
                    new TcpListener(Convert.ToInt32(args[0])).Start();
                    Console.WriteLine("Press Enter to stop listening.");
                    Console.ReadLine();
                }
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception.Message);
            }
        }
    }
}

Save this as Listen.cs, and compile via:

C:\Windows\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\Microsoft.VisualBasic.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll /debug+ /debug:full /filealign:512 /optimize- /out:Listen.exe /target:exe Listen.cs

August 19

Error 2203 When Installing Team Foundation Server 2008 SP1

If you encounter the error below when trying to integrate Team Foundation Server 2008 SP1 into the installation media, make the contents of the AT folder you copied writeable.  The documentation doesn't say to do this, but if you copied from the install media using something like robocopy that doesn't reset the read/write flags, you'll hit this.

The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2203.

Keywords:
TFS90SP1-KB949786-ENU.exe
TFS90SP1-KB949786.msp
Visual Studio Team Foundation Server 2008 SP1
Integrate the Installation of Team Foundation Server and Service Pack 1

July 31

Stacy Harris Does Home Automation! on .NET Rocks

Stacy Harris' Home Automation interview with the .NET Rocks! folks went live today.  Stacy is a brilliant technologist and those who know him are very fortunate.  If you like home automation or technology in general make sure you check these out!

Stacy Harris Does Home Automation!
http://www.dotnetrocks.com/default.aspx?showNum=364

He’s also done two articles for Coding4Fun:

Home Automation with Windows Workflow
http://blogs.msdn.com/coding4fun/archive/2007/10/05/5296972.aspx

Home Automation with Microsoft Robotics Developer Studio 2008
http://blogs.msdn.com/coding4fun/archive/2008/05/23/8544962.aspx

June 16

Added RSS Links List

I have added a new list to the blog, "RSS Links".  It can be found at RSS Links.  This will be the metadata feed for my blog, where I will aggregate all of my other feeds to.  Of particular note is my del.icio.us rss feed.  This is where I post any useful articles or snippets I've found along the way.

On a side note, I have recently converted to Firefox.  In and of itself, I haven't found a large difference between Firefox and Internet Explorer, but the del.icio.us plugin for Firefox has made the big difference for me.  See below for a screen shot:

FirefoxAndDelicious

April 22

Keeping Unique Team Foundation Server Workspace Paths in a Virtualized Developer Environment v1.0

I've been working inside of a virtualized developer environment for quite some time, and have brought this mentality to the projects that I work on.  One of the things that we do is have each developer run the same virtual machine.  This brings some enormous benefits, especially when the virtual machine you're distributing to your developers has everything they'll need for a project.  There is one gotcha though when connecting to Team Foundation Server.

In this case, the virtual machine's network name is "esd" (Enterprise Systems Developer).  This can cause problems when multiple developers connect to a Team Foundation Server and set their working directory  to the same path.  Below is a typical example of this problem:

Developer Lyle @esd:

Source Control Folder Local Folder

$/Company Website Team System Project

C:\Source\CompanyWebsite

Developer Scott @esd:

Source Control Folder Local Folder

$/Company Website Team System Project

C:\Source\CompanyWebsite

Since the Computer in the Workspace dialog box cannot be changed (nor should it be able to), we end up with a problem where the machine name and the workspace working folder match.  This means that if Lyle makes a change, TFS cannot determine the difference and now effectively Lyle and Scott are messing up each others' work.  This part *should* be handled by the merge facility in TFS, but there's a bigger problem here.  When Lyle downloads the latest version of the Company Website project to his workspace, Scott will not download anything to his machine when he gets latest, unless he does a special Get Latest... Force command, since Team Foundation Server thinks that workspace already has the latest updated copy.

The solution to this is quite simple.  Have each of your developers put something unique in their Local Folder path.  For example:

Developer Lyle @esd:

Source Control Folder Local Folder

$/Company Website Team System Project

C:\Source\Lyle\CompanyWebsite

Developer Scott @esd:

Source Control Folder Local Folder

$/Company Website Team System Project

C:\Source\Scott\CompanyWebsite

Although this is theoretically an easy fix, the implementation of this on your project team usually isn't.  When new developers come on board, or you're setting up your new laptop to connect, etc., you may forget this tip.  I wanted to make it easier for virtualized developer environments, so I wanted to have this constraint enforced at the Team Foundation Server level, but also have the message somehow communicated to the user or systems management people as to the reasoning of the failure when this overlapping workspace mapping was accidentally attempted.

The first pass at keeping this from happening is to make the sql call that creates the workspace on the server side fail.  In a future version, I'm going to look at intercepting the call on the Team Foundation Server side to display a custom message to the client.  In this version, the error message in the Team Foundation Server database tier's even logs will have the message given by sp_addmessage below.

Here are the changes for the TfsVersionControl database:

USE TfsVersionControl
GO

EXEC sp_addmessage @msgnum = 50001, @severity = 11, @msgtext = 'Please use a different working path.  This working path is already in use by another virtual machine and will cause conflicts.'
GO

CREATE TRIGGER tbl_WorkspaceLink_InsteadTrigger on tbl_WorkspaceLink
INSTEAD OF INSERT
AS
BEGIN
    IF EXISTS(
        SELECT
            w.*
        FROM
            tbl_Workspace w
            INNER JOIN tbl_WorkspaceLink wl ON w.WorkspaceId = wl.WorkspaceId
            INNER JOIN Inserted i ON i.WorkspaceId = wl.WorkspaceId
        WHERE
            wl.Url = i.Url
    )
    BEGIN
        PRINT 'ALREADY EXISTS'
        RAISERROR (50001, 11, 0)
    END
    ELSE
    BEGIN
        PRINT 'NEW VALUE'
        INSERT INTO tbl_WorkspaceLink(WorkspaceId, LinkType, Url) SELECT WorkspaceId, LinkType, Url FROM Inserted
    END
END
GO