BizTalk 2006 Development and Deployment Best Practice

BizTalk 2006 Development and Deployment Best Practice

I often get asked about best practice for deploying and migrating BTS applications.  In 2004 I used Scott Colestocks Deployment Framework for BizTalk which worked well.  In 2006, there is a bit more build in flexibility and support for variables with MSI installer cababilities.  See the Selective Binding Import SDK example.

For more deployment best practice advice see:

“Deploying and Managing BizTalk Applications“

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/BTS06CoreDocs/html/d933ad2b-702b-48df-8ef6-a5702d0521e2.asp

“Best Practices for Deploying a BizTalk Application”:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/BTS06CoreDocs/html/97ebf479-0dc5-4e95-b409-d3b6ad3d60d0.asp

BizTalk 2006 BTSHttpReceive Example

BizTalk 2006 BTSHttpReceive Example

I wanted to demo the Http adapter in BizTalk 2006. 


I found a useful article here http://dallas.sark.com/SarkBlog/jmsummers/archive/2006/02/13/2477.aspx.


But in the end I found the SDK example under C:\Program Files\Microsoft BizTalk Server 2006\SDK\Samples\AdaptersUsage\HTTPRequestResponse was simple and straightforward.


Online doco is here:


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/bts06coredocs/html/81c66f61-d86c-49cf-8d24-21c67c68bc5a.asp


 


 


 

Back In Town, And Commerce Server Best Practices Analyzer

Just returned from a pleasant 10-day vacation to London and Edinburgh and am ready to get back to work. A few musings …

  • If you live in the LA area, I recommend NOT using LA Limo Service for transportation. I got a call an hour before my pickup saying they had to cancel
    because the driver was in traffic. Traffic in Southern California … shocking. Good planning, Magellan.
  • Why are there so many freakin’ Italian restaurants in London? I think they outnumbered the English pubs. Best food I had was actually
    Indian. Just great stuff at Moti Mahal in Kensington.
  • For a city that has virtually no pubic trash receptacles, the streets are surprisingly clean. Where does all the trash go (not counting
    the Tube tracks)?
  • If you get chance, that train ride from London to Scotland is something else. You don’t get scenery like that in SoCal.
  • I’ve developed a man-crush on St. Louis Cardinals baseball coach Tony La Russa after reading
    Three Nights in August
    on the plane flight. Of the couple dozen books I’ve read this year, this might be my favorite.
  • If your female companion wants to wear 3-inch heeled boots to tour a hilly, cobblestone saturated castle, take my advice,
    tell them not to. It’s terrifying to watch.

In order to not make this a completely useless post from a technical perspective, don’t forget
to check out the brand new
Commerce Server 2007 Best Practices Analyzer. As with the BizTalk BPA, it doesn’t change any configuration settings, but, does
make you aware of less than optimal settings.

Technorati Tags: Commerce Server

Production Debugging…

Despite all the functional testing and stress testing you do prior to releasing your
BizTalk app into production, unexpected behavior can (and often will) happen just
the same.  Production usage just winds up introducing all sorts of permutations
(including interactions with external systems) that are hard to predict earlier in
the lifecycle.

The goal, of course, is to minimize the the operational “care and feeding” that an
application requires over time.  Making this happen is mostly a function of using
the application’s “diagnostic surface area” (logs, counters, MOM packs, etc.) to feed
back into each release cycle.  But we also need post-mortem tools when the host
environment terminates unexpectedly or stops responding (whether that environment
is BizTalk, IIS, COM+, Sql SSIS, etc.)

While a well-designed app will be able to successfully restart and resume processing
(with full data integrity) at such a point (i.e. after the host has been terminated),
there is still operational expense that has been injected.  We want to find and
eliminate these problems…

Using the Visual Studio debugger is almost never an option in production, of course. 
We need the ability to capture the current state as a “dump file” and do offline analysis. 

The “Windows
Debugging Tools” are designed for this purpose (and you will often use these during
a call with Microsoft’s support staff, so it is good to be familiar with them.) 
The debugging tools are a pretty large subject – so here, we are just going to cover
the bare minimum required to capture a dump file for your running BizTalk process
when it appears to be hung with a large number of “Active” service instances.

Step By Step:

  • Install or xcopy the Windows
    Debugging Tools to the server where BizTalk is currently hung (or crashing unexpectedly.) 
    It can be helpful to install in an easy location for command line access like ‘c:\debuggers’.
  • From command line, run the following from the command line to get process IDs for
    all BizTalk hosts:
    typeperf “\BizTalk:Messaging(*)\ID Process” -sc 1
  • Run ‘adplus.vbs’ in crash or hang mode, depending on whether the process ends unexpectedly
    (crash) or has become unresponsive (hang).  To generate a hang dump, your command
    line might look like:
    c:\debuggers\cscript adplus.vbs –hang –CTCF –p (pid from last step)
    –o c:\temp
  • Copy the dump file to an offline location if need be.
  • Set an envrionment variable called ‘_NT_SYMBOL_PATH’ to ‘srv*c:\symbols*http://msdl.microsoft.com/download/symbols’. 
    Alternatively, launch WinDbg.exe from the debuggers directory and use the File-‘Symbol
    File Path’ menu.  This will ensure that you are automatically downloading the
    correct symbols when you analyze the crash dump.  
  • Start WinDbg.exe, and use File-‘Open Crash Dump’ to open your dump file.  Then,
    in the command window, use:
    ‘.load C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\sos.dll’ to load managed code
    debugging extensions.
  • In the command window, use !EEStack to get a full stack trace.  Use Edit-Find
    to search for your custom code method name or the name of your orchestration. 
    Look for patterns that indicate the cause of the hang (“hmmm, all my threads seem
    to be inside Thread.Sleep. That’s funny.”)  Use !help from the command window
    to begin learning about the rest of SOS (to assist with diagnosing managed memory
    leaks, etc.)

For more information on the Windows debugging tools, see here.

Production Debugging…

Despite all the functional testing and stress testing you do prior to releasing your
BizTalk app into production, unexpected behavior can (and often will) happen just
the same.  Production usage just winds up introducing all sorts of permutations
(including interactions with external systems) that are hard to predict earlier in
the lifecycle.

The goal, of course, is to minimize the the operational “care and feeding” that an
application requires over time.  Making this happen is mostly a function of using
the application’s “diagnostic surface area” (logs, counters, MOM packs, etc.) to feed
back into each release cycle.  But we also need post-mortem tools when the host
environment terminates unexpectedly or stops responding (whether that environment
is BizTalk, IIS, COM+, Sql SSIS, etc.)

While a well-designed app will be able to successfully restart and resume processing
(with full data integrity) at such a point (i.e. after the host has been terminated),
there is still operational expense that has been injected.  We want to find and
eliminate these problems…

Using the Visual Studio debugger is almost never an option in production, of course. 
We need the ability to capture the current state as a “dump file” and do offline analysis. 

The “Windows
Debugging Tools” are designed for this purpose (and you will often use these during
a call with Microsoft’s support staff, so it is good to be familiar with them.) 
The debugging tools are a pretty large subject – so here, we are just going to cover
the bare minimum required to capture a dump file for your running BizTalk process
when it appears to be hung with a large number of “Active” service instances.

Step By Step:

  • Install or xcopy the Windows
    Debugging Tools to the server where BizTalk is currently hung (or crashing unexpectedly.) 
    It can be helpful to install in an easy location for command line access like ‘c:\debuggers’.
  • From command line, run the following from the command line to get process IDs for
    all BizTalk hosts:
    typeperf “\BizTalk:Messaging(*)\ID Process” -sc 1
  • Run ‘adplus.vbs’ in crash or hang mode, depending on whether the process ends unexpectedly
    (crash) or has become unresponsive (hang).  To generate a hang dump, your command
    line might look like:
    c:\debuggers\cscript adplus.vbs –hang –CTCF –p (pid from last step)
    –o c:\temp
  • Copy the dump file to an offline location if need be.
  • Set an envrionment variable called ‘_NT_SYMBOL_PATH’ to ‘srv*c:\symbols*http://msdl.microsoft.com/download/symbols’. 
    Alternatively, launch WinDbg.exe from the debuggers directory and use the File-‘Symbol
    File Path’ menu.  This will ensure that you are automatically downloading the
    correct symbols when you analyze the crash dump.  
  • Start WinDbg.exe, and use File-‘Open Crash Dump’ to open your dump file.  Then,
    in the command window, use:
    ‘.load C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\sos.dll’ to load managed code
    debugging extensions.
  • In the command window, use !EEStack to get a full stack trace.  Use Edit-Find
    to search for your custom code method name or the name of your orchestration. 
    Look for patterns that indicate the cause of the hang (“hmmm, all my threads seem
    to be inside Thread.Sleep. That’s funny.”)  Use !help from the command window
    to begin learning about the rest of SOS (to assist with diagnosing managed memory
    leaks, etc.)

For more information on the Windows debugging tools, see here.

Back In Town, And Commerce Server Best Practices Analyzer

Just returned from a pleasant 10-day vacation to London and Edinburgh and am ready to get back to work. A few musings …

  • If you live in the LA area, I recommend NOT using LA Limo Service for transportation. I got a call an hour before my pickup saying they had to cancel
    because the driver was in traffic. Traffic in Southern California … shocking. Good planning, Magellan.
  • Why are there so many freakin’ Italian restaurants in London? I think they outnumbered the English pubs. Best food I had was actually
    Indian. Just great stuff at Moti Mahal in Kensington.
  • For a city that has virtually no pubic trash receptacles, the streets are surprisingly clean. Where does all the trash go (not counting
    the Tube tracks)?
  • If you get chance, that train ride from London to Scotland is something else. You don’t get scenery like that in SoCal.
  • I’ve developed a man-crush on St. Louis Cardinals baseball coach Tony La Russa after reading
    Three Nights in August
    on the plane flight. Of the couple dozen books I’ve read this year, this might be my favorite.
  • If your female companion wants to wear 3-inch heeled boots to tour a hilly, cobblestone saturated castle, take my advice,
    tell them not to. It’s terrifying to watch.

In order to not make this a completely useless post from a technical perspective, don’t forget
to check out the brand new
Commerce Server 2007 Best Practices Analyzer. As with the BizTalk BPA, it doesn’t change any configuration settings, but, does
make you aware of less than optimal settings.

Technorati Tags: Commerce Server

Enhancing Microsoft Content Management Server with ASP.NET 2.0 – book review

A while back I was part of the reviewing process for this book – it’s pretty solidy around the MCMS and ASP.NET 2.0 space.

Some great authors were all over this – the book is a breath of fresh air with some
great ideas for MCMS enhancements.

Great work guys, your trusty reviewer…… (I now can get back to a family….and
there’s no note on the fridge 😉

There’s an e-book version tooo!!

Grab it HERE

Here’s the details:

Book Details

Language English

Paperback 180 pages [191mm x 235mm]
Release date August 2006
ISBN 1904811523
Author(s) Lim Mei Ying, Stefan
Go%u00dfner, Spencer Harbar

Topics and Technologies Content
Management, Microsoft & .NET


Get Microsoft Content Management Server Service Pack 2 up and running,
and start using the most talked about features of ASP.NET 2.0 like master pages, site
navigation, themes, and the membership provider model, in your MCMS development.

In Detail

The release
of Microsoft Content Management Server (MCMS) Service Pack 2 opens up the world of
ASP.NET 2.0 to MCMS developers. Written by the masters of MCMS, this book shows you
how to use the new features of ASP.NET 2.0 that everyone is talking about in your
MCMS development.

You will first learn how to install and configure MCMS SP2. There are two approaches
to setting up a development environment for SP2: an upgrade from a previous SP1a installation
or starting from scratch and building a fresh installation including SP2. Of course,
both approaches are covered.

You will become familiar with the MCMS Service Pack 2 development environment, and
create custom Visual Studio 2005 templates to overcome some of the issues which are
present with the templates shipped with MCMS SP2.

After that, its time to look at some of the most exciting features of ASP.NET 2.0,
and how you can make use of them in MCMS: master pages, site navigation, themes, and
the membership provider model.

One of the coolest features introduced with ASP.NET 2.0 is master pages, which allow
developers to enforce common layout and behaviour across pages within an application.
You will learn about the benefits of using master pages and see a step-by-step guide
for implementing them in your MCMS applications, where they become master templates!

ASP.NET 2.0 introduces a whole new way of implementing site navigation, driven by
site maps. By programmatically adding channels and postings to a site map you will
see how to smoothly integrate these controls to any MCMS site.

To customize the look of your site, we will see how a common look and feel can be
applied efficiently to a MCMS site by using ASP.NET 2.0 themes. An essential customization
required for themes to work correctly in an MCMS site is a must-read feature of this
chapter.

MCMS has its own role based authorization and user management system which cannot
be extended. However, the new ASP.NET 2.0 Membership Provider Model and the shipped
controls can be used within MCMS applications to improve the implementation of Forms
Authentication and provide a more elegant solution for authenticating against an external
store.

A collection of tips and tricks round off the book, including using the Provider Model
design pattern to ease migration to Office SharePoint Portal Server

What you will learn from this book

ASP.NET
2.0 and MCMS, together, for the first time.

  • Install and configure MCMS Service Pack 2
  • Become familiar with the MCMS Service Pack 2 development environment
  • Master ASP.NET master pages and make them master templates
  • Integrate ASP.NET site navigation controls into your MCMS site
  • Customize the look and feel of your MCMS site with ASP.NET themes
  • Apply the ASP.NET membership provider model to enhance MCMS authentication
  • Tips and Tricks to get ASP.NET and MCMS living together in peace

Who this book is written for The book
is written for developers who work with Microsoft Content Management Server, and want
to update their skills to take advantage of the latest offerings in ASP.NET. If you
are an MCMS developer who hasn’t yet got into ASP.NET 2.0, this book is an ideal introduction
to the most exciting features of ASP.NET 2.0, and how you can make them work for you.

BTS Diary II – 11 – Tip – View BTS Assemblies in Windows Explorer

BTS Diary II – 11 – Tip – View BTS Assemblies in Windows Explorer

Got a great tip from a colleague that i wanted to share with you. Do the following steps



  • Open up a command prompt at “C:\Program Files\Microsoft BizTalk Server 2004\Developer Tools”  and
  • do a Regsvr32 BTSAsmExt.dll

Now in Windows Explorer along with Control Panel etc, you can see a new option titled “Biztalk Server Assemblies”. Double click the assembly and it shows you the dependencies on the left pane and the components on the right hand side. For assemblies which contain schemas double clicking the XSD will open up a little browser to view the XSD.


This is pretty cool and saves the bother of having to open up the Biztalk Server Explorer every time and gives more info this way too.


Oh and by the way, before i forget, if you havent looked at the documentation for the Biztalk.ExplorerOM.dll, do that now. Its waay coool and shows how powerful and deep the object model is. We made use of it recently when writing some custom steps for BizUnit (more on that later , its almost midnight and i gotta go crash) and it really grabbed me. Now i’ve got plans for that baby!! 🙂

Speaking at the VBUG conference

Speaking at the VBUG conference

A personal milestone.Following on from my talk at the VBUG local meeting a couple of months ago, I’ve now been invited to present an “Introduction to Biztalk” session at the VBUG 2006 conference. Im really excited about this. I think the timing is quite perfect too. We are currently exploring a move to v2006 and looking at how it can be used with VSTS, Software Factories etc and i think theres just about enough time to find out some useful stuff and present it along with the experience we’ve had so far with v2004. The session will feature both Biztalk 2004 and 2006, since the development experience is pretty much the same, with some improvements overall in 2006 (flat file wizard, publishing orchestrations as webservices, consuming webservices returning arrays, error message routing and so on). The major area however is the changes in deployment so that should get some coverage as well. We’ve also been working quite a lot with BizUnit and have written some custom steps in an ‘extension’ DLL project and im hoping to put that up for download after the conference. Stay tuned for more info.