Welcome to BizTalk Development Sign in | Join | Help
It has been awhile since I last blogged. I have been away working on a very interesting project for a financial services company. The project entailed building a service broker using BizTalk 2006 (not R2) with WCF to achieve better decoupling of service consumers and service providers. Now that the project has entered the code-freeze stage, I shall have more time to write about the interesting design challenges and how I solved them. Stay tuned...

When deploying a BizTalk 2006 solution from Visual Studios, you may have encountered errors similar to the one pictured below:

Failed to update binding info.jpg

Due to a quirk in BizTalk, the cached binding information sometimes gets in the way of deployment. The easiest way to get around this problem is to simply stop (Full) the offending application in the Admin Console, then retry the deployment.

 

 

 

I was querying Search using SharePoint's object model when I encountered the following error message:

"Your search cannot be completed because this site is not assigned to an indexer. Contact your administrator for more information."

The answer turned out to be quite straight forward. To assign an indexer, launch the SharePoint 3.0 Central Administration console:

SharePoint 3.0 Central Administration > Application Management > SharePoint Web Application Management : Content databases > [select the content database used by your site] > Search Server : Select Windows SharePoint Services search server

That's it!

One of the great features with SharePoint is its seamless integration with Office. The new MOSS 2007 is no exception. However, there is a pretty nasty bug that somehow slipped through Microsoft's QA process. This bug can be reproduced if you access MOSS 2007 with a machine that has a mixed Office 2003 + 2007 installation. For example: You have Office 2003 for Word and Excel,  and then you installed SharePoint Designer 2007.

When you access a MOSS site and click on a feature that requires Office, you will get the following error that will crash IE7:

ErrorMessage.jpg

You are getting this error because the installation of a Office 2007 application places a copy of OWSSUPP.DLL on your computer. Your browser calls this DLL to interact with Office and if you don't have the 2007 version of Word, Excel, or InfoPath, it doesn't know what to do. You will need to disable the version of OWSSUPP.DLL found in the directory below (rename it to OWSUPP.DLLX for example.).

C:\Program Files\Microsoft Office\Office12\OWSSUPP.DLL (File Version : 12.0.4518.1014)


By disabling the offending version of the DLL, your browser will recognize that you have the wrong version of Office and display the appropriate error message like this one:

CorrectError.jpg

 

 

 

You may have to written code that checks if an object is null before you use it. For example:

Rexx.Lexer.RexxCodeStatementList list = null;
string name;
if (list != null)
{
   if (list.Count > 1) name =list[1].Name;
}
else
{
   name = "-NA-";
}

This can be abbreviated into the following code using the && operator:

Rexx.Lexer.RexxCodeStatementList list = null;
string name;
if (list != null && list.Count > 1)
{
   name =list[1].Name;
}
else
{
   name = "-NA-";
}

The && (andalso in VB.NET) shortcircuit the if statment when false.

0 Comments
Filed under: ,

Knowing all the classes in the CodeDOM namespace isn't very useful unless one knows how to appy them. This blog entry will serve as a cheat sheet for the most commonly used expressions and statements. This page is a work in progress.


MyClass.Method("value", 4)

System.CodeDom.CodeExpression expr = new CodeMethodInvokeExpression(
   new CodeMethodReferenceExpression(new CodeVariableReferenceExpression("MyClass"), "Method"), 
   new CodePrimitiveExpression("value"), 
   new CodePrimitiveExpression (4)));

MyClass.Method("value", GetItemByIdex(4))

System.CodeDom.CodeExpression expr = new CodeMethodInvokeExpression(
   new CodeMethodReferenceExpression(new CodeVariableReferenceExpression ("MyClass"), "Method"), 
   new CodePrimitiveExpression("value"), 
   new CodeMethodInvokeExpression(
      new CodeMethodReferenceExpression (new CodeThisReferenceExpression (), "GetItemByIndex"),
      new CodePrimitiveExpression (4))));

string.Empty

System.CodeDom.CodeExpression expr = new System.CodeDom.CodeFieldReferenceExpression(new System.CodeDom.CodeTypeReferenceExpression (typeof(string)), "Empty");

this.Method

System.CodeDom.CodeExpression expr = new System.CodeDom.CodeFieldReferenceExpression(new System.CodeDom.CodeThisReferenceExpression (), "Property"); // this.Property

x = 0xFF

System.CodeDom.CodeExpression expr = new CodeVariableReferenceExpression("x"),
   new CodeSnippetExpression ("0xFF")));

for (int i = 0; (i< 8); i=(i+1)){}

CodeVariableReferenceExpression var = new CodeVariableReferenceExpression ("i");
CodeIterationStatement forLoop = new CodeIterationStatement(
   new CodeVariableDeclarationStatement(typeof(int), "i", new CodePrimitiveExpression (0)),
   new CodeBinaryOperatorExpression(var, CodeBinaryOperatorType.LessThan, new CodePrimitiveExpression (8)),
   new CodeAssignStatement(var, new CodeBinaryOperatorExpression(var, CodeBinaryOperatorType.Add, new CodePrimitiveExpression (1)))));


* the extra white space in some of the code is to avoid the censoring mechanism which I didn't want to turn off.
0 Comments
Filed under: ,

Your orchestration uses a 2 way RoleLink for delivery but a new trading partner will only accept orders via a one way port. What do you do?

If the RoleLink requires a 2 way port, you’ll have to bind it to a 2 way port. To get around this restriction, you can create a special 2 way send port which sends the message back to a 2 way HttpReceive location (with loop back turned on). The loop back satisfies the response requirement of the 2 way RoleLink. The receive location should then have a 1 way send port subscribe to it which will handle the actual delivery.

 

The other day, in discussing the virtues of automated continuous integration with a client, I came across a few excuses for not adapting the process. The argument goes like this:

  “We don’t have enough hardware resource for a build server.” 
  “I am the sole developer so I don’t need it.”

My response for the first excuse is one word: “Virtualization.” A build server does not require a lot of resource nor tremendous CPU power. If you don’t have a spare computer, what about spare a portion of your computer? A 256MB memory partition and 5GB of disk space is enough to host an OS complete with CruiseControl.NET, nAnt , nUnit, Visual Studio 2005, and even SQL. Another advantage of using a virtualized build server is that you can make a snap shot of a working system and easily revert to it in the event that your build process corrupts the system (such as the install script screwing up the registry hive or SQL script dropping the wrong database).

The second excuse is just as invalid. First of all, the practice of continuous integration enforces good development habit. If you have unit test for all your work, you are already way ahead of the curve. Why not leverage the power of the computer to help you with integration testing as well? Secondly, how many of you can honestly remember all the intricate code you wrote months ago and can confidently alter it without extensive regression testing?

I, for one, like to refactor my code as I progress through a large project. Some of my changes may pass my unit test but fails in an integration test. As I usually partition my projects so I am only focused in one portion at a time. Automated continuous integration helps me catch problems like that before it gets too hairy to tackle.

Remember, automated continuous integration is your friend.

The Tracking Profile Editor (TPE), allows the user to add or remove tracking profile without having access to the a .BTT file (not possible with bttdeploy.exe).

Tracking Profile Editor> Tools > Remove Tracking Profile

It is possible to apply a new tracking profile without first remove a previous profile. When applying tracking profiles, sucessive profiles are stored and only the last one is active (hybernated activities will continue to use the older profile until completed). When removing tracking profiles, all profiles are removed. This makes it very handy in development mode.  However, I came upon this error today when I tried to remove my profile:

Failed to remove the tracking profile. (Microsoft.BizTalk.Bam.TrackingProfileEditor.MainForm) Error removing tracking profile for messaging. (Microsoft.BizTalk.Bam.TrackingCompiler.MessagingDeployer)

Normally, the TPE is able to remove the tracking profile even if I make changes to the in memory copy. However, this time, it had difficulty resolving the differences. So I had to exit the TPE. I reloaded the TPE, imported the BAM definition, and then removed the tracking profile successfully.

 

0 Comments
Filed under: ,

Here is a code snippet for writing information to the EventLog. This code will work in a BizTalk Expression Shape as well as in a .NET application.

if (!System.Diagnostics.EventLog.SourceExists("BizTalkDev.Assembly.Namespace"))
{
  System.Diagnostics.EventLog.CreateEventSource("BizTalkDev.Assembly.Namespace", "Application");
}
System.Diagnostics.EventLog.WriteEntry("BizTalkDev.Assembly.Namespace", "Error Message Here", System.Diagnostics.EventLogEntryType.Error);

Instead of writing to the "Application" folder, you might consider using your own folder (replace "Application" with "MyEventLogFolderName") so it will be easier to find your Events.

If you get an EventLog access error, see this post for the correct registry setting.

 

This morning I discovered that my Windows Defender no longer worked. I was prompted with a non-intuitive error message:

Application failed to initialize: 0x800106ba. A problem caused Windows Defender Service to stop. To start the service, restart your computer or search Help and Support on how to start a service manually.

Following one of the recommendations -- reboot -- did not yield any positive result. I decided to do a System Restore to a point before the last Windows Defender definition was updated thinking that the definition may have corrupted Windows Defender. To my dismay, System Restore no longer works either.

It did not immediately dawn on me that the Beta 2 version I was running had expired and I simply had to upgrade to the release version that Microsoft has provided free of charge at the following link:

http://www.microsoft.com/downloads/details.aspx?FamilyId=435BFCE7-DA2B-4A6A-AFA4-F7F14E605A0D&displaylang=en

You would think Microsoft would provide the proper expiration warning for a product that expires after a certain date. No such luck.

So, there you have it. If you ran into the same issue, head on over to Microsoft and download the Release version of Windows Defender.

0 Comments
Filed under:
I just ordered a Dell SC1435 and I must say that I am very impressed with how much computing power Dell packed into a diminutive 1U space. My server is equipped with 2 AMD Opteron dual core processors running at 1.8 Ghz, 4 GB of RAM and 80GB HD for only $1,809 after tax and shipping. I think I paid almost as much for my Motorola 6502 powered 8-bit computer back in the 80s. I can't wait to test BizTalk development on it. Below is a little video clip I found that showcase the machine:

<a href="http://www.youtube.com/v/OsB0D2zQdBA"><img src="/Themes/default/images/video.gif" border = "0" width="425" height="350"></a><br /><a href = "http://www.youtube.com/v/OsB0D2zQdBA">View Video</a><br />Format: ???<br />Duration: --:--

0 Comments
Filed under: , ,

Here is how you can create a messaging based solution that sends an HTTP POST acknowledgement without involving an orchestration:

  1. Create a new receive port by right-mouse-click -- Receive Ports > New >
    Request Response Receive Port. Name it "Rcv2way" and click [OK]
  2. Create a receive location to pair with the receive port by
    right-mouse-click -- Receive Locations > New > Request Response Location >
    pick "Rcv2Way" port and click [OK] > Name location whatever you want, select
    "HTTP" as your transport type, click on [Configure] > under "virtual
    directory plus ISAPI extension", type in
    "/BTSHTTPReceive/BTSHTTPReceive.dll?Test2Way", under public address, type in
    "
    http://localhost/BTSHTTPReceive/BTSHTTPReceive.dll?Test2Way", check
    "Loopback" and click on [OK]
  3. Create a send port by right-mouse-click -- Send Ports > New > Static
    One-Way Send Port > Name port whatever you want, select "FILE" as your
    transport type, click on [Configure] to specify your destination folder.
  4. Select the new send port you just created and in the Properties window,
    select Filters. Add the following rule: BTS.ReceivePortName == "Rcv2Way".
  5. Enable the Receive Location and Start the Send Port

In this example, the acknowledgement is in the form of an echo of whatever
is posted to the receive location. Because the send port subscribes to the
receive port, it will forward a copy of the received message to the
destination folder specified.

The Excel BAM Add-On makes creating BAM Definition a snap.  For example: clustering the various Sent Delivery (SentEmail, SentHttp, SentFTP..etc.) milestones into a “SentGroup” so it can be used to create a duration “SentDuration” and then perhaps a measure “AverageSentDuration”.

However, it can be quite arduous if not down right impossible when it comes time to refactor a BAM definition.

In the above scenario, the milestone group “SentGroup” cannot be modified once created. To do something as trivial as adding a new milestone “SentSoap” to the “SentGroup”, one must undo the whole chain of definitions that references “SentGroup”. First, the user must delete the “AverageSentDuration” measure. Second, delete the “SentDuration” duration. Third, delete the “SentGroup”, and then finally recreate the “SentGroup” with the new milestone.

Fortunately, renaming a milestone alias is more straight-forward as the BAM Add-on will propagate the changes automatically. However, one must be careful not to delete a milestone alias in the Edit BAM View screen:

BAM Excel Add-On Edit View Screen

 

Otherwise you may encounter the following error when trying to [Save] or [Export XML]:

This XML does not conform to the BizTalk Server 2006 Bam Definition Schema.


You may rename the milestone alias but not delete them. Keep in mind that the BAM Add-on tool doesn't always prevent the user from doing actions that may affect the schema integrity.  When in doubt, try to save the file. If you encounter this error, you've corrupted the definition. At this point you will have to quit Excel and restart the editing process from the last good version.


"When in doubt, save often!"

 

0 Comments
Filed under: ,

The DevConnection conference in Las Vegas this week offers developers and IT professional alike great opportunities to learn the latest Microsoft technology offerings.

I especially enjoyed sessions on SharePoint 2007 and Business Intelligence Tools. Unfortunately, many of the sessions I was interested in were in the same time slot so it wasn’t easy to decide which ones to attend.

Microsoft was promoting a new social networking site for IT professionals at the show. It is called Aggreg8.net. I created a workgroup for BizTalk professionals on the site. Check out the site!

 

0 Comments
Filed under:
More Posts Next page »