Tuesday, June 29, 2010

AX .NET Business Connector – How to Open Multiple Company Connections Simultaneously

As part of a recent project we needed to access the .NET Business Connector in Dynamics AX through a component (in this case for data lookup in BizTalk’s Business Rule Engine).  Because we were going to have many messages flowing through in a short period of time all requiring evaluation of business rules based on AX data, we intended to create some helper classes to enable the reuse of AX connections and to cache data used in the rules.  Our challenge was that messages were destined for different companies in AX.  If you have two orchestrations simultaneously evaluating these rules which in turn simultaneously open connections to AX you run into a bit of trouble.

Suppose you have two Microsoft.Dynamics.BusinessConnectorNet.Axapta objects (DAX1, DAX2), one each for different companies:

System.Net.NetworkCredential credential = new System.Net.NetworkCredential("<BC_USER>", "<BC_PASSWORD>", "<BC_DOMAIN>");
DAX1.LogonAs("<AX_USER>”, "<BC_DOMAIN>", credential, "<COMPANY_1>", "", "<COMPANY_1>@<AOS>:<PORT>", "");
DAX2.LogonAs("<AX_USER>”, "<BC_DOMAIN>", credential, "<COMPANY_2>", "", "<COMPANY_2>@<AOS>:<PORT>", "");

When you reach the second LogonAs statement, the logon fails with an exception of type LogonSystemChangedException.  ("The logon failed because the logon parameters do not match those currently being used in Business Connector").

The following blog post gives a good description of the Business Connector’s intended use, which is essentially to act as a client:

http://blogs.msdn.com/floditt/archive/2008/07/24/the-net-business-connector-bc-net-and-the-iis.aspx

At first it seemed there was no way to do this.  We opened a ticket with Microsoft and as a short term solution, installed the AX Client on the BizTalk server so that we could use the overload of LogonAs that takes a path to an .axc file with connection details.  It turns out this works, however you have the overhead of installing the AX client on the BizTalk server and creating .axc files for BizTalk.  We didn’t like this idea also because of issues with maintaining the .axc files and the slower performance of the Business Connector using the Client to read the .axc file.

Ultimately Microsoft came back with a resolution.  It turns out that the parameter for the object server (second last parameter) was incorrect.  Unfortunately in many code samples and on MSDN, this parameter is defined as "Company1@AosInstance:PortNumber”.  The first part of this should actually be the Instance Name (by default “DynamicsAx”) and the part after the @ sign is the Server name.  A better example might be “DynamicsAx@AOSSERVER01:2712”.

Changing the above code to use Instance names works:

System.Net.NetworkCredential credential = new System.Net.NetworkCredential("<BC_USER>", "<BC_PASSWORD>", "<BC_DOMAIN>");
DAX1.LogonAs("<AX_USER>”, "<BC_DOMAIN>", credential, "<COMPANY_1>", "", "<INSTANCE_NAME>@<AOS>:<PORT>", "");
DAX2.LogonAs("<AX_USER>”, "<BC_DOMAIN>", credential, "<COMPANY_2>", "", "<INSTANCE_NAME>@<AOS>:<PORT>", "");

So now we can open two connections to AX simultaneously with different companies in the same object instance.

Monday, November 23, 2009

BizTalk BAM Authentication Error

I ran into this issue today on my VPC running BTS2009 on WIN2K8/IIS7:

HTTP Error 401: The requested resource requires user authentication

I found the following blog posting which helped me resolve the issue:

http://sharepointservices.wordpress.com/2009/04/28/http-error-401-the-requested-resource-requires-user-authentication-in-iis7/

Indeed turning off kernel-mode authentication fixed it but I too am concerned with the validity of this fix.  For now I am not too concerned because it is a local dev VPC so I will see if the new production servers will have the same issue.


Thursday, September 10, 2009

Dynamics AX AIF Adapter Progress

Well after some initial struggles with locked channels (never resolved this, just built a new VPC!!) I have both the AIF tutorial and some PoCs working. 

Just to clarify that in a previous post I mentioned the latest issue of BizTalk HotRod which has an article on the adapter.  While most of the configuration is the same, it’s important to note that the article uses Dynamics AX 4.0, not 2009.

A particular challenge I recently had to overcome was regarding security on the send port.  I had setup and tested the AIF tutorials using a Proxy User (providing an AX user account/password right in the send port).  This worked great.  However, once I wanted to enable another document service (namely LedgerPurchaseInvoiceService) and follow an identical approach (correctly assigning a Data Policy, verifying my endpoints) I continued to get errors in the event log indicating permission was denied.  I was using the administrator account as both the BC service account and the gateway user.  I looked at a few other reports of similar issues but couldn’t get it working.

Some colleagues had mentioned that security configuration with AIF can be a challenge, and particularly that using anything other than the Host User configuration can sometimes just not work.  I remain convinced that it should work, I’m just not doing something right.  However I didn’t have a lot of time to debug it and/or open a PSS ticket, so I proceeded to change the send port to use the identity of the Host User (ensuring the service account was a user in DAX with the right permissions) and it worked. 

I am still concerned about the cause of issue with the Proxy User configuration, but the reality is that it likely makes more sense to use the host instance account for authentication regardless as it simplifies deployment (no password to maintain) and you can keep whatever degree of account isolation you need (one account for all Host Instances, or one per endpoint/service).

OutOfMemoryException on MemoryStream in Pipeline Component

On one of my projects, I was using a custom pipeline component to decompress a file in a send pipeline (*see side note on design decision at end of post).  In the production environment, we began to see pipeline failures caused by mscorlib OutOfMemoryExceptions in the pipeline component.  It was happening sporadically, so at first was not clear what was happening, though we knew the issue was occurring with growing frequency, roughly in correlation to the increase in the size of the file (the compressed file was a statement of account balances which grew as the number of accounts grew).

As many BizTalkers do, I use the SharpZipLib library for Zip compression (see Pro BizTalk 2006 by Dunphy and Metwally for a great example of this) and was taking the approach of loading the zipstream into a MemoryStream object.  The exception was being thrown in my loop which copied 4K segments into the stream.

After consulting my trusted advisor I saw a few discussions related to the need to provide a contiguous segment of memory for a MemoryStream to work.

I quickly inferred the likely culprit: I was trying to load data into a MemoryStream without the OS knowing how much memory to allocate it, so in many cases it was allocating a contiguous block that would not be enough for the uncompressed file.

Short term fix:

For the time being, I have simply updated my pipeline component to declare the size of the MemoryStream up front based on the zipstream’s Size property which is the number of bytes of the fiie uncompressed.

DANGER: the Size property is a Long, whereas you can only instantiate a MemoryStream with an Int32 (of course from the 2GB memory limit for 32-bit processes).  Knowing the file size will not grow beyond 1GB uncompressed, I have squished the long into an int, which of course is terrible.  Hence a long-term fix:

Long term fix:

Though I have yet to implement this, the sensible approach is instead to use something like the VirtualStream which will offload data to the filesystem if a stream exceeds a configured size, saving your poor BTSNTSvc.exe

Indeed hardware should never be used to mask up bad code, but it’s interesting to consider that this issue would likely not have arisen if it had been deployed on a 64-bit OS, which we can hopefully encourage all clients to do in the future.

 

* as a side note, the unzip was done in a send pipeline, in opposition to the usual approach of decompressing a file in a receive pipeline because the contents of the file were not needed.  All we wanted to do was route based on the file name, so by delaying the decompression we only needed to load a 16MB compressed file to the messagebox instead of a 700MB uncompressed file.

Thursday, August 27, 2009

Relative .snk file paths in Visual Studio 2008

I’m sure someone has already blogged on this, but as a reminder to myself and others, in Visual Studio 2008 it is not as straightforward to provide a relative path for a shared .snk file (for instance when signing multiple BizTalk projects with the same key file).

In the past, you could simply type in the path to the snk file in the project properties. Now this field is a dropdown and selecting browse will only let you find and copy the file to the root of the project.

image

To get around this, you can edit the project file (in the case of BizTalk, the .btproj). The following is an example where the .snk is both included as a shortcut in the project (not a copy) and uses the .snk for signing:

(Note: this project is the updated project schema for BizTalk 2009, so don't try to use this approach for BTS2006+VS2005)

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{6092B853-D9B4-4C5E-B480-746703C74E80}</ProjectGuid>
<ProjectTypeGuids>{EF7E3281-CD33-11D4-8326-00C04FA0CE8D};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>library</OutputType>
<GenericProcessing>true</GenericProcessing>
<RootNamespace>Test.Orchestrations</RootNamespace>
<AssemblyName>Test.Orchestrations</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<BpelCompliance>True</BpelCompliance>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\Test.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System">
<Name>System</Name>
</Reference>
<Reference Include="System.Xml">
<Name>System.XML</Name>
</Reference>
<Reference Include="System.Configuration">
<Name>System.Configuration</Name>
</Reference>
<Reference Include="Microsoft.BizTalk.Pipeline">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Microsoft.BizTalk.DefaultPipelines">
<Name>Microsoft.BizTalk.DefaultPipelines</Name>
</Reference>
<Reference Include="Microsoft.BizTalk.GlobalPropertySchemas">
<Name>Microsoft.BizTalk.GlobalPropertySchemas</Name>
</Reference>
<Reference Include="Microsoft.BizTalk.TestTools">
<Name>Microsoft.BizTalk.TestTools</Name>
</Reference>
<Reference Include="Microsoft.XLANGs.BaseTypes">
<Name>Microsoft.XLANGs.BaseTypes</Name>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="..\Test.snk" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\BizTalk\BizTalkC.targets" />
</Project>

Just save the file and VS will reload the project showing “..\Test.snk” as the location of the strong name key file.

Friday, August 21, 2009

SysPreping a BizTalk development machine

Great info from MSDN on how to set up a development VM that can be shared with other developers in team scenarios. The scripts are included in the BizTalk SDK.

http://msdn.microsoft.com/en-us/library/dd792685%28BTS.10%29.aspx

Note that it mentions that WSS installations will likely need to be reconfigured to get working again following the sysprep. If WSS is required, considering either leaving WSS unconfigured or not installing until after sysprepping.

An error occurred when validating an AS2 message

In an AS2 BizTalk solution for a client, we began to see a number of errors in the event log and the behaviour was that no messages or MDNs would arrive from a particular third party:

We checked the certificate store and determined the certificate had not been revoked or expired. Searching the certificate store for the certificate to see where it was installed revealed that the certificate was no longer in the Other People store which is used by BizTalk for verifying signed messages. We found the resolution on our own, but after the fact noticed the following MSDN article which seems to be pretty thorough about resolving this issue. Note that our resolution is the last item on the "User Action" list:

http://msdn.microsoft.com/en-us/library/bb898960%28BTS.10%29.aspx

BizTalk and Dynamics AX 2009 AIF Integration

I'm taking the first steps down the road of integrating BizTalk and DAX. By many accounts, it's not the straightest road, but I'm up for the challenge :) I'll include any learnings on this as I go. In the mean time, here is where I have started on this road:

Microsoft Dynamics AX 2009 AIF BizTalk Adapter Configuration White Paper
http://www.microsoft.com/downloads/details.aspx?familyid=EDC62433-5B21-4F74-B065-B075BA6DC86D&displaylang=en

Latest BizTalk HotRod issue
http://biztalkhotrod.com/Documents/Issue7_Q3_2009.pdf

Monday, July 06, 2009

BizTalk BAM Data Archiving

Being a bit late to the finer points of managing a BAM installation, I'm just discovering some useful and important things to know about BAM, particularly managing its archive and understanding its data age policy.

http://seroter.wordpress.com/2007/06/22/biztalk-bam-data-archiving-explained/

As always, thanks Richard for making such in-depth-yet-easy-to-understand posts.  Makes my job a lot easier :)

Thursday, July 02, 2009

BAM Activity and Real-time Aggregations Windows

You can modify the duration data is kept in the BAMPrimaryImport database using the bam_Metadata_Activities table:

http://technet.microsoft.com/en-us/library/ms962341.aspx

In addition, if you are using Real-time Aggregations for BAM data, you can set the window of data kept using the bm utility and the set-rtawindow command:

http://msdn.microsoft.com/en-us/library/aa559458.aspx

Wednesday, October 01, 2008

Changing Default BAM Alerts From Email

By default, the BAM alerts installed out of the box are set up to be mailed with a from address of BAM@microsoft.com This is a security concern for clients, not to mention kind of silly.

I kept looking for a while for the steps to change this, so I'm posting this so I can remember for next time.

General info on the script used is documented in MSDN:
http://msdn.microsoft.com/en-us/library/aa560641.aspx

These steps came from a user named Kent Weare on a BizTalk R2 General forum, but I am reposting his response in case it becomes unavailable in the future. The steps look to be copy-pasted from documentation somewhere, which I have yet to find an original source for. Note: there is no step 1.


Step 2: Retrieve the current BAMAlerts Application Definition File
(ADF)

1. On the Start menu, point to All Programs, point to Microsoft SQL Server 2005, point to Notification Services, and then click Notification Services Command Prompt to open a Notification Services Command Prompt window.
2. C:\Program Files\Microsoft BizTalk Server 2006\Tracking>cscript ProcessBamNSFiles.vbs -Get config.xml adf.xml BAMPrimaryImport

Step 3: Modify Application Definition File (ADF)

1. Copy adf.xml to ClusterAdf.xml
2. Change SMTP from info: from ‘BAM@Microsoft.com’ to ‘’.
4. Save ClusterAdf.xml

Step 4: Update the current BAMAlert Application Definition File (ADF)

1. C:\Program Files\Microsoft BizTalk Server 2006\Tracking>cscript ProcessBamNSFiles.vbs -Update config.xml ClusterAdf.xml
BAMPrimaryImport

Don't worry about the "ClusterAdf.xml" naming convention. We clustered the Bam alerts service hence us calling the file that.

Friday, September 26, 2008

Event Log error on BTSHTTPReceive.dll

This posting also helped me figure out why I got event log errors indicating IIS could not find a file in the C:\Windows\Temp directory. 
 
Always make sure the application pool worker service account has Read access to the windows Temp directory!
 
 

Successful Configuration of the BAM Portal

This post helped me work out a HTTP 401 error I was receiving on the BAM Portal.  I only had to do the first step he recommended (setting authentication to use NTLM) which can be missed, especially if (as I have) created a whole new website to host BAM.
 
 

Monday, August 11, 2008

BizTalk Deployment Framework: Add Reference to Application

I wish I had found this before - I had not previously found a way to script the adding of a reference to another application, and thus used workarounds (like including assemblies from other projects).

http://blogs.sqlxml.org/bryantlikes/archive/2007/07/18/creating-biztalk-application-references-with-nant.aspx

This is particularly useful if you have a separate application defined for a common Exception Handling framework (for instance using the ESB Guidance package: http://www.codeplex.com/esb).

Thanks Bryant!

Wednesday, June 25, 2008

The Starbuckian Handbook from Hog Blog

For those of us admitted users of a local coffee shop for times we don't need to work at the office but need to get out of the house, someone has drawn up a reasonable code of ethics for the 'Starbuckian'. 

http://www.radicalcareering.com/hogblog/?p=80

Friday, January 04, 2008

So You Want to Learn BizTalk... (Part II)

With the fundamental concepts of BizTalk server under your belt, you are ready to get your hands dirty.

Labs

While especially easy to use if you do not have a development machine setup, these labs provide a relatively superficial demonstration of the core BizTalk features. Can be useful for a quick demo to a non-developer though.

Microsoft Virtual Labs
http://msdn2.microsoft.com/en-us/virtuallabs/aa740373.aspx

Tutorials

What's better are the tutorials that are part of the documentation and SDK. This is where a developer really goes 'aha!' for the first time and starts to see he or she can begin to use BizTalk Server. These are not optional ;)

BizTalk Tutorials:
http://msdn2.microsoft.com/en-us/library/aa560270.aspx

Training

If you or your employer are part of the Microsoft Partner program, you have access to perhaps the most valuable and comprehensive self-training package out there - the Classroom-in-a-Box. It includes training videos and slides, whitepapers, more hands-on labs and a VPC with every possible BizTalk core feature installed and configured. It can be accessed under the Partner Resources in the BizTalk product area:
https://partner.microsoft.com/US/40012176

Books

I don't claim to have read many of the books out there on the product. From experience however I can safely say that this book has proved valuable numerous times both as a first read a reference on projects:
http://www.chapters.indigo.ca/books/item/books-978159059699/0/Pro+Biztalk+2006

You can read my review of it here:
http://asonofmartha.blogspot.com/2006/11/pro-biztalk-2006.html

Additional titles can be found here:
http://btob.barnesandnoble.com/index.asp?sourceID=0041631635&btob=Y

Blogs

With prior versions of BizTalk Server, the best place to get answers to real-world problems was always through blogs. Now, MSDN is typically the authority on the "How-To" and plenty of books exist for the product, however there continue to be scores of bloggers discussing their challenges and successes implementing BizTalk solutions. Too many to list in fact, and so here are some links to discover those blogs:

http://www.squidoo.com/bts06

http://www.biztalkgurus.com/

http://www.biztalkgurus.com/blogs/

My del.icio.us BizTalk links:

http://del.icio.us/zutroyquixote/BizTalk


Newsletters and Publications

BizTalk Gurus offers a periodic newsletter called The BizTalker with useful "news from the front":
http://www.biztalkgurus.com/newsletter/index.aspx

There is also a quarterly publication now on its third release called BizTalk HotRod

Where to next...

At this point, you should be well-armed to assist in new or existing BizTalk projects. However, if you are expected to start or lead a project on your own you will do well to fill out your training with additional reading and possibly formal training (including certification).

Coming Up Next:

Part III: Beyond the basics

Previously:

Part I:

Friday, December 21, 2007

So You Want to Learn BizTalk... (Part I)

Learning a new technology can often be a challenge especially if it is one that requires a different different set of lenses on the world. No better can this thought be applied than to the undertaking of learning BizTalk development. It is not for the faint of heart. Let me make it clear that BizTalk is a very powerful and agile tool - but this in combination with the complexities of the problems it solves gives the tool a steep learning curve.

Experience Prerequisites

  • Strong knowledge of the .NET Framework (2.0 or higher)
  • Strong familiarity with XML and related tools (XPath, XSLT)
  • Understanding of SOAP web services and when to use them
  • Use of Visual Studio 2005
I wrote this list then realized an almost identical list comes from the horse's mouth:
http://msdn2.microsoft.com/en-us/library/aa577674.aspx

Experience Nice-To-Haves
  • Experience with Integration projects
  • Understanding of Message-Oriented development
  • Understanding of Service-Oriented Architecture (incl the Tenets of SOA)
  • Understanding of Enterprise Services Buses
Where to Begin

As with development of any server product, I strongly recommend using a virtual PC on which you can install everything (SQL Server + BIzTalk Server + Visual Studio). Development can be done on a separate machine from the DEV server, but if you are using a VPC having everything on the same box will save time.

Part of the initiation to BizTalk development should most certainly include performing the full BizTalk installation. This will serve to appreciate what is actually under-the-hood. Even if infrastructure and server installation is not your forte, this experience will serve you well in your trials and tribulations ... er, travels.

To start, as with most Microsoft products, the best place is the Microsoft Learning:

Clinic 2954: First Look: Microsoft BizTalk Server 2006 for Developers
https://www.microsoftelearning.com/eLearning/courseDetail.aspx?courseId=51883

With that, you can flesh out the details with this article from the documentation:

Product Documentation: Understanding BizTalk
http://msdn2.microsoft.com/en-us/library/aa546748.aspx


Coming Up Next:

Part II: Tutorials, Labs and Books, Oh My!

Part III: Beyond the basics

Friday, September 21, 2007

CompSci != Software Engineering

Regarding Chris Chapman's article Reviewing Ontario CompSci Schools: Who's Teaching Best Practices? of September 17,2007

I was going to post this as a comment on his blog, but it turned into a posting of my own :)

I definitely appreciate the sentiments Chris has raised and respect the research he has done (even if he says it is a rough assessment). My biggest beef with this analysis, however, is that it completely ignores the fact that as many as half of the schools looked into also offer Computer Engineering with a Software specialization, if not true Software Engineering within the Engineering (not the Science) faculties.

I will insist that this is an important distinction. A Science faculty is going to emphasize research and development, as well as the more hard/pure/abstract aspects of Computer Science. Topics such as best practices in industry, ethics and professionalism are of course going to be elective, as they might be in mathematics or botany programs. I suppose the unfortunate reality is that most Comp Sci grads still go into industry as a developer (for instance) but the industry has made the assumption that such grads are software professionals truly grounded in best practices and methodology.

Software engineering is such an oft-abused word and by no means does a comp-sci grad necessarily have software engineering skills or even understand what software engineering really means. Especially in Ontario (to tow the line of the PEO) it is becoming clear why so many engineering faculties are trying to bring software engineering into their domain - industry is expecting a software developer to have engineering skills! And as you imply, it is to the detriment to us all in the software industry if these issues are not cleared up: people in the industry need to have a grounding in best practices and projects need to completed successfully within time/budget etc.

Having come through the Software Engineering program at UWO, I agree that there is still some bias towards requirements engineering (which for better or worse is still an approach used in the industry) but other methodologies including Agile are gaining more ground. The academic calendar for Western's SE program can be seen on this link:

http://www.westerncalendar.uwo.ca/western/web/2007(new)/Courses_UWO_SE.html

Universities by nature still tend to be slow moving of course and with such a rapidly evolving industry like software, there will likely always be a disparity between what is taught and what is done. That means industry may have to bear the burden of ramping up new grads. So be it - I'm sure this is nothing new to most employers. That said, I am all for academic programs (particularly ones with an industry focus, like engineering) teaching and making mandatory courses on best practices.

The reasons for software project failures are many, not the least of which is people understanding the difference between software and other "hard engineering" projects. I think much of the solution lies in educating industry on where best practices are truly taught (as Chris has helped show) but more importantly actually teaching them to all software graduates (especially those becoming software professionals) and this will likely include the continued migration of teaching software engineering into the engineering schools.

Monday, September 17, 2007

Path to MCPD Certification Revised!

Whoa was I off... In one of my previous postings I outlined the steps to achieving an MCPD in Enterprise Applications. While legitimate, it is leveraging exams that focus on .NET 1.1 and are not part of the "new" stream of MCP exams. If you actually read the page for the MCPD requirements (as I apparently did not) it indicates that for individuals with no previous certifications, it really takes 5 exams (see plan below). This new path cannot, sadly, leverage my MCTS in BizTalk Server and does not have any intermediate certifications besides a .NET MCTS, but it only takes 5 exams rather than the 7 I had outlined before.


Exam

Certification Awarded

70-536


70-528

MCTS: .NET Framework 2.0 Web Applications

70-526

MCTS: .NET Framework 2.0 Windows Applications

70-553

MCTS: .NET Framework 2.0 Distributed Applications

70-549

MCPD: Enterprise Applications Developer


If you like, you can also get the specific MCPD after each of the MCTS if you don't intend on going as far as the MCPD Enterprise Applications.

Certification requirements:

Thursday, September 13, 2007

Migrating BizTalk 2004 (VS 2003) Solution to BizTalk 2006 (VS 2005)

While the BizTalk Server product team has done a commendable job of being able to migrate an already deployed BizTalk 2004 solution to BizTalk 2006 in-situ, there is definitely some effort in upgrading the Visual Studio solution itself such that subsequent deploys actually work.

The situation is complicated by two things: the change in project definitions between VS 2003 and VS 2005, and of course the migration from .NET 1.1 to .NET 2.0 (there should be no complication by .NET 3.0 with BizTalk 2006 R2 as .NET 2.0 exists as-is in 3.0).

Depending on the solution, some of the following items may not apply, and there may be other items not mentioned you will need to take care of (ie referencing deprecated classes, method overloads etc).


  1. Migrate the solution to VS 2005 by simply opening the VS 2003 .sln file.  Complete the steps of the solution migration wizard.  This will generate a report of the items you may need to fix (esp deprecated classes)
  2. Once in the solution, at the BizTalk Project level you will need to do the following:
    1. If you have web references in your project, you will need to rebuild them.
      1. Delete each web reference and re-add them with the same name
      2. If you use Dynamic web references, ensure that property is selected
      3. Add a reference to System.Configuration if it is not there already (the compiler will fail otherwise)
    2. Open the project's properties
      1. Assign a default BizTalk Configuration Database
      2. Assign an Application Name
  3. For each schema in your solution that uses promoted properties
    1. Open the 'Show Promotions' dialog.  This will rebuild the xsd's code-behind (.cs)
  4. For each orchestration with a web-port
    1. Delete the configured web port (since you regenerated the web reference)
    2. Re-add the web port with the same name, ensuring it is a Dynamic web port if necessary
    3. Re-assign message types for messages defined in Orchestration Explorer
    4. Re-connect send/receive shapes if necessary
You may find after your first build there are new warnings.  Some warnings have been added to assist in improving the performance/stability of your BizTalk solution.  The one most notable to my solution was the following:

Performance Warning: marking service 'OrchestrationName' as a longrunning transaction is not necessary and incurs the performance penalty of an extra commit

For orchestrations where long-running was not necessary (ie do not contain send/receive pattern or other long-running transactions), I have since changed them to use Transaction Type of None.  Hopefully we will see a reduction of database chatter for these orchestrations when we benchmark the changes.

Clearly the migration is not trivial, though hopefully yours is smooth and relatively quick.