Wednesday, 15 January 2014

Deploying Custom Pipeline Component on BizTalk Server (PROD)

Deploying Custom Pipeline Component on BizTalk Server:


·        Deploying BizTalk Custom Pipeline Component  on BizTalk Server 2006 or Older Version :

To deploy the custom Pipeline component on BizTalk server 2006 or older version. We need to add the Custom Pipeline component in GAC as well as “C:\Program Files (x86)\Microsoft BizTalk Server 2006\Pipeline Components” folder.

 At design time it will access the Pipeline component dll located in “…..Microsoft  BizTalk Server 2006\Pipeline Components” folder and show the component in pipeline toolbox.

At runtime the BizTalk will use the Custom Pipeline component from GAC.

·        Deploying BizTalk Custom Pipeline Component  on BizTalk Server 2006 R2 or New Version :

To deploy the custom Pipeline component on BizTalk server 2006 R2 or later version. We need to add the Custom Pipeline component only in “C:\Program Files (x86)\Microsoft BizTalk Server 2010\Pipeline Components” folder. No need to GAC this component.

 At design & Run time it will use the Pipeline component dll located in “…..Microsoft  BizTalk Server 2010\Pipeline Components” folder .

Deployment On Production for BizTalk Server 2006 R2 or later version:
1.      Case 1 :  Custom Pipeline component dll added to GAC but not located in “C:\Program Files (x86)\Microsoft BizTalk Server 2010\Pipeline Components”
At runtime the Biztalk process will first try to find the dll in “Pipeline Component” and if it does not find it in this folder then check the dll in GAC. Once it find the dll in GAC, it will use it. Process won’t give any error.

2.      Case 2 :  Custom Pipeline component dll added to folder “C:\Program Files (x86)\Microsoft BizTalk Server 2010\Pipeline Components” but not in GAC
At runtime the Biztalk process will first try to find the dll in “Pipeline Component”. As it find the dll in ‘Pipeline Component’ folder won’t go to GAC, it will use the dll located in GAC. Process won’t give any error.

3.      Case 3 :  Custom Pipeline component dll  neither added in  GAC nor in folder “C:\Program Files (x86)\Microsoft BizTalk Server 2010\Pipeline Components”
At runtime the Biztalk process will first try to find the dll in “Pipeline Component” and if it does not find it in this folder then check the dll in GAC. The process will also not able to find the Custom Pipeline component dll in GAC. This time the process will throw the error “ Custom Pipelince component  ‘Assembly Name’ not found in C:\Program Files (x86)\Microsoft BizTalk Server 2010\Pipeline Components”


From BizTalk Server 2006 R2, we don't have add the Custom Pipeline component in GAC.
The Default expected location for this dll is  C:\Program Files (x86)\Microsoft BizTalk Server 2010\Pipeline Components”
And if it does not find the dll at this location then it will check assembly in GAC.

Sunday, 12 January 2014

C# : check whether input string data is XML or NOT



To check whether input string data is XML or NOT.


Simply copy and paste the following code. This code will throw an exception in case input string is not XML.

       if (!String.IsNullOrEmpty(sXMLMessage))
            {
                try
                {
                    System.Xml.Linq.XElement.Parse(sXMLMessage);
                   // Business Logic for XML string data here

                }
                catch (XmlException ex)
                {                  
                   // Business Logic for non-xml string data here
                }
            }

BizTalk Error : Could not enlist send port 'portname': the property specified on the filter expression does not exist



BizTalk Error :

Error message when you enlist a send port that has a port filter against a user-defined property in BizTalk Server: "Could not enlist send port 'portname': the property specified on the filter expression does not exist"

Cause :

When trying to start the SendPort configured with filter property, I was getting above error.
After analyzing I found that the cause for this error was namespace conflict. I have deployed the some schema in BizTalk system which has same target namespace as this schema.

I deployed Schema A for Project A and trying to use property of Schema A in filter expression.

Project A -> Schema A -> Target NameSpace  = “ http://Microsoft.Test.Schema

But this target namespace were already present under Project B

Project B -> Schema B ->  Target NameSpace  = “ http://Microsoft.Test.Schema

This problem occurs when the property that is used in the port filter has a namespace conflict with the target namespace of another schema assembly.



Solution : Remove the Target Namespace conflict between schema. Then it will work without any error.

Tuesday, 7 January 2014

BizTalk Error The local, cached version of the BizTalk Server group configuration is out of date.





When we try to delete BizTalk application or Map from BizTalk Admin console, we might get this type of error and this error might occur on every environment from development machines to production servers.

Error :

"Error while removing application "BT Project name".
Schema referenced by Map ‘BTProject’ has been deleted. The local, cached version of the BizTalk Server group configuration is out of date. You must refresh the BizTalk Server group configuration before making further changes."


By Mistake I deployed the BizTalk Map project before the BizTalk schema project. The BizTalk Map project were having reference to BizTalk Schema project. When I tried to delete the deployed BizTalk project it gave me above error.

And every time you refresh BizTalk Admin console you will get the above error.

Solution :
 To fix the  above error you need to manually delete entry from  table bt_mapspec, this table is located inside BizTalkMgmtDB,
You can refer following queries to delete the map

-- Locate the itemId of the map
Select * from bt_mapspec
-- Using the itemId retrieved above delete the map
Delete from bt_mapspec Where itemid = 'itemId_of_map'

Delete from bt_mapspec Where assemblyid = ‘id’

After executing above SQL query, just refresh the BizTalk admin console. It should work now.



Love BizTalk, Think BizTalk!!!