# Monday, September 10, 2007

In preparation for the talk I am giving tomorrow on BizTalk Server R2 and the WCF Adapters, I thought I would post some notes on how to setup and configure a BizTalk Server 2006 R2 development environment.

The installation is really quite straightforward.  Start with a relatively clean machine (I suggest you use a virtual machine, as these are all beta bits).  My (virtual) machine had the following installed before I started the R2 installation:

  • Windows Server 2003 R2 Standard Edition with Service Pack 2
  • IIS 6.0
  • Microsoft .NET 1.0, 1.1, 2.0, 3.0
  • Microsoft Visual Studio 2005 Team Developer Edition with Service Pack SP1
  • SQL Server 2005 with Service Pack SP2

Additionally, you need to install the Windows SDK and .NET Framework 3.0 Runtime Components.  This gives you the documentation, samples, header files, libraries, and tools you need to develop applications that run on Windows.  You can download this from: http://www.microsoft.com/downloads/details.aspx?FamilyId=C2B1E300-F358-4523-B479-F53D234CDCCF&displaylang=en.  Note: it takes awhile, so be patient.  Also, I removed the documentation and samples, which makes the download and installation a lot faster.

From here you just need to download the R2 bits.  To find out how you can obtain BizTalk Server 2006 R2 (beta 2), take a look at this article: http://support.microsoft.com/kb/936046.  Or, if you want me to save you the work and take you directly to the bits, you can go here: https://connect.microsoft.com/Downloads/DownloadDetails.aspx?SiteID=65&DownloadID=6014.

The BizTalk 2006 R2 Beta 2 release includes the following components:

  • BizTalk core engine
  • EDI
  • RFID
  • LOB Adapters
  • BizTalk Accelerators (HL7, SWIFT, RosettaNet)

The components are available by downloading and installing the following files:

  • BTS06R2_Beta2.exe
  • BTS06R2_Beta2_Accelerators.zip
  • BizTalk LOB Adapters Sp1 Beta2.exe
  • CustomSOAPHeaderPipeline.zip

Note: if you only want the R2 functionality (e.g. WCF, etc) you only need BTS06R2_Beta2.exe.

After I downloaded all the files, I first extracted the contents of BTS06R2_Beta2.exe to a temporary folder (choose a folder you can remember, like C:\Temp\BTS06R2_Beta2).  Next, I ran Setup.exe from that folder.  Click Next until you get to the Component Installation screen.  You'll see that there are a few differences from the standard BizTalk components.  Here's a peak:

 BizTalk Server 2006 R2 Installation Wizard

I decided to leave the default settings.  Feel free to do what you want.  Continue to click Next until you get to the Summary screen.  Review your selections and click Install (you may also want to set your auto-login credentials to save time).

After it installs you have to run the BizTalk Configuration Tool.  The configuration is roughly the same as it is for BizTalk Server 2006:

BizTalk Server 2006 R2 Configuration

I don't plan on using many of the features at the moment (e.g. BAM, HWS, etc.) so I only installed the following features:

BizTalk Server 2006 R2 Features

And that's it!  At this point, you will have BizTalk 2006 R2 (beta 2) installed and functioning.  Open up the BizTalk Server 2006 Administration Console and take a look at the adapters now available to you:

BizTalk Server 2006 R2 Adapters

Specifically, you now can use the following adapters:

  • WCF-BasicHttp
  • WCF-Custom
  • WCF-CustomIsolated
  • WCF-NetMsmq
  • WCF-NetNamedPipe
  • WCF-NetTcp
  • WCF-WSHttp

I hope this helps you explore the new functionality available to you in BizTalk Server 2006 R2.  Enjoy!

posted on Monday, September 10, 2007 4:37:11 PM (Central Standard Time, UTC-06:00)  #    Comments [0]

I know this notice is late, but I will be presenting a talk entitled "BizTalk Server 2006 R2 and the WCF Adapters" to the Denver BizTalk User Group tomorrow.  Here's the link to the event:

BizTalk User Group: BizTalk Server 2006 R2 and the WCF Adapters

The event will take place at the Denver Microsoft building at the following address:

Maroon Bells Room
7595 Technology Way
Suite 400 Denver Colorado 80237
United States

Here's the event abstract ...

BizTalk Server 2006 R2 provides new adapters that enable simple communication to and from BizTalk Server and Web services-based applications via the Windows Communication Foundation (WCF). Through the WCF Adapter SDK you can utilize these new extensions to write WCF-based transports to expose existing technologies and applications. We will discuss real world uses for the WCF adapters and provide a demonstration of these adapters in action.

I'll post my slide deck and some bits after the presentation.  I hope to see  you there!

posted on Monday, September 10, 2007 3:29:26 PM (Central Standard Time, UTC-06:00)  #    Comments [3]
# Wednesday, September 05, 2007

I was able to use the XML sample documents that come with eConnect (C:\Program Files\Microsoft Great Plains\eConnect9\XML Sample Documents\Incoming) to write some test data into my GP database using the eConnect 9.0 adapters for BizTalk Server 2006.  I setup a test environment using the TWO database for Great Plains, and through the adapter was able to insert data.  Feeling that I had made some good progress, I shutdown my machine (they are all virtualized environments) and went home for the night.

When I started everything up the next day I tried to reproduce this behavior so that I could move on with my integration.  However, every time I tried to write the document into GP through the adapter, I got the following error:

BizTalk DW Reporting

Event Type:    Error
Event Source:  BizTalk DW Reporting
Event ID:      1000
Description:   Faulting application btsntsvc.exe, version 3.5.1602.0, stamp 4410e6b9, faulting module kernel32.dll, version 5.2.3790.4062, stamp 46264680, debug? 0, fault address 0x0000bee7.

This had me stumped for a little while.  I decided to use a useful tool I received from Microsoft called the Direct Document Sender.NET (I've attached the file at the bottom of this post) to try and diagnose the problem.  This tool allows you to post an XML document directly to eConnect so that you can test out the functionality without any 3rd party application (e.g. BizTalk Server).

Using this application, I tried to post the XML file again.  This time I received a much more useful error:

System.Runtime.InteropServices.COMException (0x8000401A): The server process could not be started because the configured identity is incorrect.  Check the username and password.

Aha!  This was a much more useful error!

I opened up Component Services (Start --> Administrative Tools --> Component Services), and browsed to Computers --> My Computer --> COM+ Applications --> eConnect 9 for Great Plains.  The Microsoft Great Plains eConnect Version 9 COM Plus Package has a tab entitled Identity which allows you to define the user account under which the application runs.  Turns out that somehow my account was switched from the user I specified at installation to the interactive user system account:

Component

And this was the root cause of my problem.  eConnect requires integrated security and uses the user specified in this identity tab to access the GP database.  Consequently, the user specified must have access to the appropriate database on the GP server and also be a part of the DYNGRP role.

So, I went ahead and added my user to the DYNGRP role, made sure it had the appropriate access, and then updated account used by the COM+ package:

Component2

Having made these changes, I tested with the Document Sender.NET application - worked the first time!  Confidently I tested with BizTalk, and sure enough everything started to work!

I'm not sure why it initially worked and then stopped working after I restarted the machines.  I'm not sure if the account credentials changed or if something else was happening the first time.  All I know is that you have to use an appropriate user that has access to the database and is a member of the appropriate role, otherwise you'll get the errors I listed above.

I hope this helps!

DirectDoc9.zip (7.42 KB)

posted on Wednesday, September 05, 2007 12:51:06 PM (Central Standard Time, UTC-06:00)  #    Comments [13]
# Saturday, September 01, 2007

Lately it seems that I have had to acquire a lot of hotfixes for Microsoft products.  Unfortunately, most of the KB articles don't provide a link to the hotfix, but instead ask you to contact Microsoft Support (via phone) to acquire the hotfix.  Kind of a pain!

Fortunately, my friend Rich Finn just passed along this useful link:

Hotfix Request Web Submission Form

Very useful ... no longer will I have to reach out an contact individual escalation engineers I've worked with in the past. <sheepish grin>

posted on Saturday, September 01, 2007 10:07:47 AM (Central Standard Time, UTC-06:00)  #    Comments [1]

While reading Scott Bellware's blog today, I came across his Simpson's alter ego, courtesy of Simpsonize Me.  I had to try it out!

Evidently, here's what I look like as a Simpson's character ... the likeness is uncanny:

Simpson WadeSimpson Wade

Here's me taking a trip to the Quik-E-Mart:

Simpson Wade at Quik-E-Mart

Personally, I think my wife makes a better looking Simpson character than I do:

Simpson Teri

My daughters also make cute Simpson's characters:

Simpson Hayley Simpson Katelyn

Neat stuff!  Give it a try.

posted on Saturday, September 01, 2007 8:47:38 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
# Monday, August 20, 2007

Somehow I missed the announcement that SP1 was released for Virtual Server 2005 R2.  Given that I run nearly all my development (and some non-development) environments on R2, I'm surprised I didn't catch wind of SP1!

You can download SP1 here: http://www.microsoft.com/downloads/details.aspx?FamilyId=BC49C7C8-4840-4E67-8DC4-1E6E218ACCE4&displaylang=en.  It's interesting to note that Vista flavors are listed as supported host operating systems, yet include a "non-Production only" caveat.

I run Virtual Server 2005 R2 on Vista Business without any problems (well, if you know some tricks).  As I upgraded I noted the following:

  • When installing SP1, be sure to turn off the Virtual Server service, else you will receive the following warning:

warning 

  • It will detect the previous version and force you to upgrade:

image

  • I could be wrong, but I'm pretty sure that some of these options are new.  Sorry, I haven't had the time to research them - when I do, I promise I'll post my findings.

image

The upgrade seemed to go without a problem.  I was able to mount and start my virtual machines without any problems whatsoever.

posted on Sunday, August 19, 2007 11:46:13 PM (Central Standard Time, UTC-06:00)  #    Comments [1]
# Sunday, August 19, 2007

I know this is old news, but this post is primarily a reminder to myself -- I keep forgetting!  If you try to open a recently downloaded (or installed) help file (*.chm) in Vista, you will get the following message:

Navigation to the webpage was canceled

Navigation to the webpage was canceled.  Retype the address.

In order to view the help file, you have to right-click the file, choose Properties, and then click Unblock.

CHM properties

Thanks to Bill Evjen's for the reminder.

posted on Sunday, August 19, 2007 8:52:58 PM (Central Standard Time, UTC-06:00)  #    Comments [1]

One of the things I learned while setting up a virtual Team Foundation Server (TFS) environment is that there are definitely a few "gotchas."  I encountered one of these while writing up some documentation on how to integrate a Web Application Project (WAP).

Before I began documenting the procedure, I went through and confirmed that everything would work.  When I was finished, I figured I would delete the Team Project and start over.  However, this didn't work as I expected.  Here's what I did:

  1. Created Team Project.
  2. Added my WAP to the Team Project source control.
  3. Created a new Build Type.
  4. Ran the new build.  Worked fine.
  5. Deleted the Team Project.
    • Clicked Start -> All Programs -> Microsoft Visual Studio 2005 -> Visual Studio Tools -> Visual Studio 2005 Command Prompt
    • Typed the command: TFSDeleteProject /Server:<ServerName> <TeamProjectName>
  6. Created a new Team Project with the same name.
  7. Added the WAP to the Team Project source control.
  8. Created a new Build Type.
  9. Ran the build and received the following error:

TF50608: Unable to retrieve information for security object $PROJECT:vsts:///Classification/TeamProject/<guid, it does not exist.

TF50608: Unable to retrieve information for security object $PROJECT:vsts:///Classification/TeamProject/<guid, it does not exist.

Turns out that when you delete a Team Project, it isn't really deleted.  Parts of the project, including version control and work items, are maintained in the Team Foundation Data Warehouse and aren't removed when the project is deleted.  Consequently, when you recreate a Team Project there is lingering data.

This is pretty disappointing; it seems that, for all intents and purposes, TFS is corrupt.  The only way I could move forward was to create a new Team Project with a different name.

Anyone have any insight?

posted on Sunday, August 19, 2007 8:46:45 PM (Central Standard Time, UTC-06:00)  #    Comments [3]

Although it has its share of issues, I am a big fan of Visual Studio 2005 Team Foundation Server (known as TFS for short).  Often you'll see people only leverage it for a source code repository, but if that's all you are using it for then you are missing out.  In addition to storing source code, TFS also supports:

  • Code analysis
  • Build automation
  • Support for continuous integration
  • Automated testing
  • Reporting
  • Project tracking

I have found TFS to a very useful tool for all my custom development projects, especially Commerce Server 2007.  From a developer's perspective, I find that I am much more excited about cod analysis, build automation, continuous integration, and testing; the project tracking and management functions are great, but it's the developer tools that really tickle my fancy.  As such, I have included around 15 to 20 pages of content in my book Professional Commerce Server 2007 on how to successfully integrate Commerce Server 2007 and TFS.

To support my writing efforts, I needed to have a TFS environment available during the writing of these chapters.  I virtualize nearly all my non-production environments, and it was no different when I setup this server.

To save myself some time, I started with one of my base servers that had the following characteristics (it is extremely handy to have one of these servers archived):

  • Windows Server 2003 Standard R2 with Service Pack 2 (and all updates applied)
  • IIS installed and configured
  • .NET 2.0 installed with latest hotfixes
  • Visual Studio 2005 Team Developer installed w/ Service Pack 1
  • SQL Server 2005 Database Services with Service Pack 2

This gave me a huge head start in setting up my TFS environment.  For the rest, you should utilize the Visual Studio 2005 Team Foundation Installation Guide.  Below are some notes I took on what I did to finish the installation and configuration of TFS.

Install and Configure TFS

(Wow, for some reason Live Writer did an awful job with this list - the RSS feed is a mess!  Sorry!)

  1. Changed the computer name from "BaseServer to "TFServer." (reboot)
  2. Updated SQL Server to use the new computer name.  Ran the following script:

    sp_dropserver 'BaseServer'
    GO
    sp_addserver 'TFServer', local
    GO

  3. Deleted all the SQL Server remote logins that I didn't need.
  4. Restarted SQL Server 2005.  Don't forget to do this; otherwise, when you run SELECT @@SERVERNAME the old computer name will return.
  5. I think joined "TFServer" to my local domain. (reboot)
  6. You should use domain accounts to manage TFS.  I created the following domain accounts:

    • TFSSetup (make this account part of the local Administrators group on TFS)
    • TFSService
    • TFSReports

  7. Confirmed that IIS 6.0 has ASP.NET enabled, and also confirmed that FrontPage Server 2002 Extensions is not installed.
  8. TFS makes use of more than SQL Server 2005 Database Services.  I Installed the following additional SQL Server components:

    • Analysis Services
    • Reporting Services
    • Integration Services

  9. Shutdown the Analysis, Reporting, and Integration services.
  10. Installed Service Pack 2 for SQL Server 2005 to upgrade additional components.  The Database Services had already been upgraded, so I didn't have to touch it.
  11. Installed Hotfix for Microsoft .NET Framework 2.0 (KB913393) - this is avail on the TFS CD.
  12. Installed Windows SharePoint Services 2.0 with Service Pack 2
  13. I decided to reboot the machine; all the services I previously stopped are turned back on, and then I can login as <domain>\TFSSetup.
  14. Configured Reporting Services:

    image_thumb[6]

    • Click Start -> Microsoft SQL Server 2005 -> Configuration Tools -> Reporting Services Configuration.
    • Do the following:
      • Create a Report Server Virtual Directory
      • Create a Report Manager Virtual Directory
      • Apply the Web Service Identity
      • Configure the Database Setup
    • I left the remaining steps alone.

  15. Installed TFS.

    • Selected a Single-Server Installation.
    • Pass the System Health Check .
    • Used <domain>\TFSService to run TFS.
    • Used <domain>\TFSReports to run Reporting.
    • Enabled Team Foundation Alerts:
      • Configured local server.
      • Setup from e-mail address.

  16. Backed-up the Reporting Services Encryption key:

    image

    • Ran the Reporting Services Configuration Tool
    • Clicked Encryption Keys, and then Backup.

  17. I then browsed to the following URL: http://localhost:8080/services/v1.0/Registration.asmx

    • Clicked GetRegistrationEntries and then clicked Invoke.
    • Ensured that the type was "VSTF" within the XML output.

  18. Installed Team Explorer (on the TFS CD).
  19. Installed Visual Studio Team Foundation Service Quiescence GDR:
  20. Installed Visual Studio 2005 Team Foundation Server Service Pack 1.
  21. Installed Team Foundation Build.

    • Opened the "build" folder on the TFS CD.
    • Ran Setup.exe.
    • Used <domain>\TFSSERVICE as the service account.

  22. Ran Visual Studio 2005 Team Foundation Server Service Pack 1 again to update Team Foundation Build.
  23. One final reboot.

Now, to verify that everything was installed and configured properly, I performed confirmed that I was able to create a new Team Project.

Create a Team Project in TFS

  1. Open up Visual Studio 2005
  2. Click View -> Team Explorer
  3. Click Add Existing Team Project

    image

  4. Select your Team Foundation Server, and click OK.

    image

  5. Right-click your Team Foundation Server, and click New Team Project.

    image

  6. Follow the wizard and create a new Team Project.

All together, this process took around 3 hours.  Granted, this would have taken a lot longer if I hadn't already had a virtual machine that was mostly configured.

I hope this helps!

posted on Sunday, August 19, 2007 8:32:38 PM (Central Standard Time, UTC-06:00)  #    Comments [0]
# Saturday, August 18, 2007

I started blogging as a way of archiving tips-and-tricks I learn everyday so that I can go refer back to the post rather than having to constantly re-learn everything.  I have also tried to document ways I have solved various problems and issues that I am confronted with while working with various technologies.  I'll admit that, originally, this blog was a purely selfish endeavor - I wasn't motivated by any altruistic reasons, I simply wanted to have a way to archive things I've learned so that I could refer back to them.

Recently, though, this has all changed.  I didn't realize how much satisfaction I'd receive from seeing the that other people are also finding value in my posts.  As readership has increased, and I get more and more feedback from people that found a solution to their problem in one of my posts, I have tried to post better and more useful content.

100 readers

I know that 100 feed subscribers is a small milestone (many of the blogs I subscriber to have thousands of subscribers), but nonetheless I am proud of the slow, organic growth I've seen in my feed subscribers and blog visitors.  I don't try anything gimmicky - all I do is post content based on thing things I do everyday and the things I learn along the way.

I just thought I'd share my feed stats with you.  It's neat (at least, I think it is) to see the growth of subscribers since the day I started tracking them.  Here are my FeedBurner stats:

Feed Stats Dashboard

At the same time, traffic to the blog itself has continued to grow.  Here are stats from Google over the same period:

Google dashboard

(Amazing how visits just plummet on the weekend!)

Thanks to all of you that subscribe to my blog or occasionally visit.  And special thanks to those of you that e-mail me or leave a comment.  For those of you that haven't contacted me one way or another, please drop me an e-mail or write a comment once in awhile.  I would love to learn who you are and what you find valuable about my blog.

Thanks!

posted on Saturday, August 18, 2007 12:19:18 PM (Central Standard Time, UTC-06:00)  #    Comments [0]

One of the first things I do after installing Vista is turn off UAC (ooh, I can already feel the criticism).  I just can abide having to authorize every single action I take on the computer.  It's one thing to ask me to confirm a change to IIS or a service running on my machine, but don't make me authorize the deletion of files on the operating system!  If I clicked delete and confirmed the deletion, just delete it!

Previously, if you wanted to add a network printer that ran on Windows XP or 2003, you had to have UAC turned on.  This means that I would have to turn on UAC, reboot my machine, add the printer, turn off UAC, and then reboot my machine again.  Just to add a printer.  Brilliant!

Fortunately Microsoft just released two updates:

The first of the two specifically addresses the following "issue":

If User Account Control is disabled on the computer, you cannot install a network printer successfully. This problem occurs if the network printer is hosted by a Windows XP-based or a Windows Server 2003-based computer.

Finally!

To test this, I installed both updates (rebooting after each on), and then attempted to add a network printer.  Previously, clicking the Install driver button caused failed if UAC was turned off.

Adding a network printer in Vista

After installing the updates, however, it works exactly as one would expect it to work.

It only took six or seven months, but it seems this annoying "issue" was finally resolved.  Thank goodness!

posted on Saturday, August 18, 2007 10:24:29 AM (Central Standard Time, UTC-06:00)  #    Comments [0]

As those of you who subscribe to this blog's feed have noticed, a place holder record was written into my RSS feed.  Having just reinstalled my operating system (I have switched back to Vista Business once again), I was configuring my Windows Live Writer for this blog.  If you click View --> Update Weblog Style you will be asked the following:

Allow Writer to Create a Temporary Post?

Just say No!

If you click Yes it will post the following placeholder on your blog.  And, while it is able to delete it successfully (meaning it won't show up when you browse your blog), you will have problems getting it out of your RSS feed.

This is a temporary post that was not deleted. Please delete this manually. (79142faa-4883-4d2a-bb80-daabb3ef865c)

Pretty annoying.  I'm still trying to figure out how to get rid of it.  It no longer exists in my blogs contents, yet I can't seem to get it out of my feed (which is managed by Feedburner).

I'll post an update if I figure it out.

Just be warned!!

posted on Saturday, August 18, 2007 10:06:20 AM (Central Standard Time, UTC-06:00)  #    Comments [0]
# Thursday, August 16, 2007

I got caught up yesterday with a problem I should have recognized right away, but for whatever reason I didn't put the pieces together until it was pointed out by one of my co-workers.

I was writing a BizTalk Server 2006 orchestration that, amongst other things, sends a request to a remote server.  The remote server has an application installed that accesses these requests and initiates a few local (and unimportant) processes.  Information is passed to this application via the URL which is unique with each request and constructed by the orchestration.

Rather than use a dynamic one-way send port with the HTTP adapter, I decided to create a .NET helper project (a C# class library) and create a static method that allows me to pass in the URL and wait for a response.  The contents of the response itself is unimportant; all I require is a successful response.

I created the following class in my helper project (simplified for clarity):

using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
namespace Messaging.Helper
{
    [Serializable]
    public class Statics
    {
        public void CallUrl(string url)
        {
            WebRequest request = WebRequest.Create(url);
            request.Method = "GET";
            request.GetResponse();
        }
    }
}

As you can see, the static method uses the System.Net.WebRequest class to issue a request to the specified URL.  To test this method, I created a command-line application that iterated 20 or so times and issued requests against the remote server.  The code was similar to the following (simplified for clarity):

using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using Messaging.Helper;

namespace Messaging.ConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            for (int i = 0; i < 20; i++)
            {
                Statics.CallUrl("http://www.someurl.com/");
            }
        }
    }
}

I immediately noticed that this code failed after it issued two concurrent requests.  No matter how many times I ran it, it always was successful the first two times and then timed-out and threw an error message similar to the following:

System.Net.WebException was unhandled
 Message="The operation has timed out"
 Source="System"
 StackTrace:
  at System.Net.HttpWebRequest.GetResponse()
  at ConsoleApp.Program.Helper.CallUrl() in D:\Test\ConsoleApp\Program.cs:line 41
  at ConsoleApp.Program.Main(String[] args) in D:\Test\ConsoleApp\Program.cs:line 20
  at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
  at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
  at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
  at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
  at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
  at System.Threading.ThreadHelper.ThreadStart()

Yes, I should have immediately picked up on the fact that it succeeded the first two times but then consistently failed on each additional request.  Instead, I tried all kinds of different scenarios (non-static methods, multi-threaded calls, etc.).  Fortunately, a co-worker stopped by and reminded me that, by design, there is a limit on the number of connections you can have to any given server.  By default, this limitation is set to two!

As soon as he said that I remembered the limitation (I guess I still have a few neurons that occasionally fire).  Immediately I created an application configuration file for my command-line application and added the following (of course, I had to look-up the exact syntax):

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.net>
        <connectionManagement>
            <add address="*" maxconnection="100" />
        </connectionManagement>
    </system.net>
</configuration>

This allows for up to 100 simultaneous connections to any server.  When I ran my command-line application again it worked perfectly -- 20 requests were issued to the URL.

After poking around a little bit, I found the actual specification in the HTTP/1.1 protocol that dictates this limitation.  See Hypertext Transfer Protocol - Section 8.1.4:

"Clients that use persistent connections SHOULD limit the number of simultaneous connections that they maintain to a given server. A single-user client SHOULD NOT maintain more than 2 connections with any server or proxy. A proxy SHOULD use up to 2*N connections to another server or proxy, where N is the number of simultaneously active users. These guidelines are intended to improve HTTP response times and avoid congestion."

Ah, this explains why Internet Explorer only allows me to download two files at the same time!

Now, in order to allow my BizTalk orchestration to proper issue more than two concurrent connections (remember, it too is just calling .NET code), I needed to modify the BTSNTSvc.exe.config file that services the BizTalk host instances.  This file is found in the BizTalk Server directory under Program Files:

BTSNTSvc.exe.config

Simply add the <system.net> ... </system.net> XML to the configuration file and then restart your host instances.  This will allow you to issue more than two concurrent requests to any given web server.

I hope this helps save you some time you would have otherwise lost!

posted on Thursday, August 16, 2007 12:40:40 PM (Central Standard Time, UTC-06:00)  #    Comments [6]
# Monday, August 13, 2007

I came across a frustrating interesting problem today where the BizTalk Server 2006 Configuration wizard would fail every time I applied a new configuration.

Unlike a typical BizTalk developer environment (which usually consists of BizTalk and SQL Server on the same machine), this environment consisted of two separate machines: one BizTalk Server 2006 and one SQL Server 2005 (i.e. the BizTalk databases are stored on the SQL Server).  Additionally, this is a virtual environment and both machines were cloned from the same base Windows Server 2003 R2 template.

I was installing the following components ...

  • Enterprise Single Sign-On (SSO)
  • Group
  • BizTalk Runtime
  • MSMQT

It would successfully install ENTSSO, but would fail when installing the group.  The log file reported the following error:

Failed to configure with error message [Exception of type 'System.EnterpriseServices.TransactionProxyException' was thrown.]

The following Google search suggested to me that  the underlying problem was with MSDTC (aren't all BizTalk problems?).  I checked, and double-checked, the MSDTC properties on both servers and couldn't find anything wrong with the configuration.  So, I had to pull out the big guns.

I downloaded DTCPing (a very handy tool for debugging DTC issues) and ran it on both machines (make sure to read the instructions on how to use DTCPing as it is not straightforward).  In the generated log file I noticed the following warning:

WARNING: the CID values for both test machines are the same while this problem won't stop DTCping test, MSDTC will fail for this ...

A Google search on this warning helped me to understand that the underlying problem is that the CID values stored for MSDTC were not changed during the cloning process.  But of course!

If you're experiencing this problem, check the following registry key on both of your machines.  Are the keys identical?

HKEY_CLASSES_ROOT\CID

Mine were.  Here's the steps I took successfully reinstall MSDTC so that the CID values were unique.  Run this procedure on both machines:

  1. Use Add Windows Components, and remove Network DTC.
  2. Go to the command line and run: MSDTC -uninstall
  3. Go to the registry and delete the MSDTC keys in HKLM/Software/Microsoft/Software/MSDTC, HKLM/System/CurrentControlSet/Services/MSDTC, and HKEY_CLASSES_ROOT\CID (if they're still there).
  4. Reboot
  5. Go to the command line and run: MSDTC -install
  6. Use Add Windows Components, and add Network DTC.
  7. Go to the command line and run: net start msdtc

After running this on both servers I was able to confirm that the CID values were unique.  And, sure enough, when I next applied my configuration to BizTalk Server 2006 everything worked perfectly.

I hope this helps!

posted on Monday, August 13, 2007 3:48:34 PM (Central Standard Time, UTC-06:00)  #    Comments [13]
# Saturday, August 11, 2007

Commerce Server 2007 I often get asked about how development environments should be configured and what practices should be implemented when building a Commerce Server 2007 solution.  I have found this to be a difficult question to answer, as everyone has their own preferences and "best-practices" when it comes to development environments.  Additionally, we are often constrained by the following variables:

  • Relative importance placed on time, cost, and quality
  • Available development and QA skills
  • Software development methodology
  • Scope and function of the application

Over my career I've come up with a number of things I try to have when building a Commerce Server solution (or any enterprise-level application).

Development Environments

I believe that developers need a place to integrate their code, QA and UAT require a sandbox independent of development, that you must have a staging environment to prepare your data for production, and that production should be completely isolated from your other environments.

While I don't always get my way, I try to always have the following environments defined (in addition to production, of course):

  • Development (each developer has their own local development environment)
  • Development integration
  • Quality Assurance (QA) / User Acceptance Testing (UAT)
  • Staging

The lack of even one of these environments puts everything at risk.  For example, if you do not have a development integration environment you'll find that most of the defects QA discovers will relate to simple integration, and that they will be challenged in performing functional testing of your application.  Similarly, if your development and QA environments share resources (such as databases, etc), you'll constantly trip over yourself and find it very difficult to make forward progress.

Note that I make the assumption you will have a separate QA team and initiative.  Ignore this at your own risk!  Never trust developers to QA their own code.  I'm a developer myself, and while I always strive for perfection I have always been more successful when working with a good QA team.

Many of these environments can be virtualized.  There's nothing wrong with having your development integration and QA/UAT environments running on VMWare or Virtual Server (sometimes it's nice, as you can blow it away and revert to an earlier image).

Development Practices and Techniques

A well-architected and designed development environment is useless if you implement sloppy development practices.  It's not enough to isolate your environments - you have to put techniques and practices in place to effectively use them.

In addition to demanding these environments, I always require the following practices and techniques:

  • Source control and versioning
  • Continuous integration
  • Commerce Server Staging (CSS) and build automation
  • Unit testing & test-driven development (TDD)

It's absolutely imperative that you have a source control solution.  Without it you run so many risks that I can't even begin to describe the pains you will feel later on.  It doesn't really matter which source control solution you use, so long as it is stable, reliable, and you back it up!  Don't neglect to backup your source control databases.

Continuous integration (CI) is a practice whereby a development team frequently integrates their work (e.g. source code).  CI should be automated so that it runs regularly.  The whole point is that this automated process can find integration errors very quickly so that it reduces the pains you will feel down the road.  There's nothing worse than having your developers work in isolated environments for a significant period of time only to discover that the their code won't compile once integrated.

Commerce Server Staging (CSS) is the best and preferred way to migrate your web application and business data between environments.  You can setup the CSS services on your Commerce Server machines (not in production, mind you) so that you can deploy your code changes and business data from environment to environment.  It is useful to have a specific staging environment that is identical (or as close as possible) to production, so that your business users can manipulate the data in the staging environment rather than run the risk of screwing up production because they're playing with the data.

I firmly believe in unit testing and test-driven development (TDD).  TDD is a technique in which test cases are written and then code is subsequently written that can pass the test.  Unit tests are written for each aspect of the code and then automated so that you can get quick and effective feedback to confirm that your software is well-written.  While this technique requires discipline and (for some developers) unlearning certain habits, it is a powerful way of writing enterprise-level applications better and faster.

Conclusion

It's no easy or simple task to setup a development environment for a Commerce Server 2007 solution (or any enterprise-level application for that matter).  However, if you spend the time and energy up front to establish a good development environment, you will reap the rewards later on.

A very powerful message was driven into me at one of the first IT shops I worked for: design excellence, and rigorous attention to detail (thanks, RGI).  While I consider it criminal for developers to not religiously adhere to this creed, we are all human and often err or stray from the path.  Putting together a solid development environment and implementing good software techniques and practices can help save us from ourselves.

I would very much like to hear about everyone else's experiences with Commerce Server development environments (or any development environment).  What have you found to be successful?  Please leave a message!

posted on Saturday, August 11, 2007 10:19:16 AM (Central Standard Time, UTC-06:00)  #    Comments [2]