Posts Tagged ‘Biztalk’

Biztalk: Failed to add resource(s). Change requests failed for some resources

Today while deploying a Biztalk project I got the following error

Error 33 Access to the path ‘C:\Users\alasaad\Local Settings\Temp\BT\PID3624\BizTalkAssembly\4120c07368b1efbdf0cf62f9cd6bc7eb\MyBiztalkProject.dll’ is denied

Cleaned the project, restarted Visual studio. No good. I then rebooted the machine and I got this error

Error 42 Failed to add resource(s). Change requests failed for some resources. BizTalkAssemblyResourceManager failed to complete end type change request. Assembly “C:\Users\alasaad\AppData\Local\Temp\2\BT\PID5652\BizTalkAssembly\4120c07368b1efbdf0cf62f9cd6bc7eb\MyBiztalkProject.dll” does not appear to be a BizTalk assembly, and cannot be deployed to the Configuration database. If this assembly is referenced by other BizTalk assemblies, it needs to be installed into the global assembly cache (GAC) of each BizTalk server.

To fix the above I had to Add the following to the AsseblyInfo.cs. See

[assembly: Microsoft.XLANGs.BaseTypes.BizTalkAssemblyAttribute(typeof(BTXService))]

Seems that I deleted that line by mistake 🙂

Categories: Biztalk, Biztalk 2010 Tags: ,

Biztalk: Instance was not successfully terminated. Status is Pending

Sometimes when you try to terminate messages in Biztalk, messages may fail to terminate. Before you force the termination, you need to make sure you are ONLY terminating the messages you intend to terminate.

To force the termination, try one of the following:

Restart/Stop host instances assigned to the port or orchestration

Recycle the application pool assigned to the Webservice/WCF service if the port’s host is an isolated host

You can also wait for Biztalk to finish retrying sending the message, hence messages become suspended instances

Biztalk: Error if shared data is updated in a parallel then all references in every task must be in a synchronized or atomic scope

To solve the issue,

  • Wrap the shapes in each branch with a scope
  • Go the properties of each added scope
  • Set the Synchronized Property true (Apply on each scope on each branch)


  • Set the Transaction Type based on your requirements. In my case I am using None.
Categories: Biztalk, Biztalk 2010 Tags: ,

Biztalk: The “XLangTask” task failed unexpectedly

Last Monday I started, mainly, a Biztalk contract with a previous client. When I tried to build some of the work I have done before I was getting the following error:

Error 1 The “XLangTask” task failed unexpectedly.
System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {1BBA9F19-D4CC-34AA-918C-44FEF11E8274} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
at Microsoft.VisualStudio.BizTalkProject.Compiler.XLangCompiler.Compile(BizTalkBuildSnapshot buildSnapshot, IEnumerable`1 orchestrationFilesToCompile, String switches, String outputPath, List`1& generatedCodeFiles)
at Microsoft.VisualStudio.BizTalkProject.BuildTasks.XLangTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)

The environment was:
Windows Server 2008 R2
Biztalk 2010 Enterprise Edition
SQL Server 2008 R2
VS2010 Ultimate

I tried few things like cleaning the solution, change the build target ..etc. Nothing worked. Finally, I decided to repair Biztalk:

Control Panel –> UnInstall Programs –> click Microsoft Biztalk Server Enterprise Edition –> Uninstall/Change. Choose Repair option when prompted

And That fixed it

Categories: Biztalk, Biztalk 2010 Tags: ,

Cumulative update packages for BizTalk Server 2010

Categories: Biztalk, Biztalk 2010 Tags: ,

Biztalk Configure WCF-SQL Adapter for Outbound Operation using Typed Stored Procedure

  • Follow the steps in section Consume Adapter Service
  • Select sqlBinding from the dropdown
  • Click the Configure button

  • In the secure tab, select Windows from the “client credential type” drop down
  • In the URI Properties tab, enter the Server name, InstanceName and IntialCatalog. In the following figure the server is “LocalHost”, we are using the default instance, and IntialCatalog the name of the adventureworks2008R2 database

  • Click Binding Properties

  • Click Ok
  • Click the Connect button
  • Select Client (Outbound operations)
  • Click Strongly-Typed Procedures from the “Select a category” list
  • Select a stored procedure from the “Available categories and operations” list
  • Click the Add button. Notice that the stored procedure is now list in the “Added categories and operations”
  • You can click the properties button to view the schema that will be generated
  • You can add multiple stored procedures if you want to have them all under one schema

  • Click OK
  • Notice in the solution explorer window that two files are add; one is the xsd schema and the other is the binding xml file

    • You can add the schema to the Schmas or any other folder. Make sure you modify the name space
    • You can change the Type Name and File Name

    • Open the XSD file by double clicking on it
    • Select the Schema Node

    • Make sure that you DO NOT change the target Namespace
    • Make sure you DO NOT modify the elements’ names

  • Import port binding by following these steps
    • Open Biztalk admin console
    • Expand Biztalk server administration
    • Expand Biztalk groups
    • Expand Applications
    • Right click on the application you want to import the port to
    • Select Import à bindings
    • Select the generated xml file from step 16
    • Select the send ports node

    • Double click on the send port

    • Click Configure
    • If you only have one operation, Copy the value of the Action element, clear the textbox and past the copied value into the textbox

    • Click Ok

Consume Adapter Service in Biztalk Application

  • Right click on the Biztalk project
  • Click AddàAdd Generated Items

  • Click Consume Adapter Service

  • Click Add
Categories: Biztalk, Biztalk 2010, WCF Tags: , ,

Configure WCF-SQL Adapter for Inbound Operation with FOR XML Clause

Add Generated Item option in visual studio does NOT generate proper schema when using FOR XML EXPLICIT clause. This post shows how to configure a receive port to consume WCF service. Make sure that your application has been deployed before following the next steps

The following steps are to configure the WCF-SQL adapter to poll data:

  • Open Biztalk server administrator console
  • Expand your application
  • Select Receive ports node

  • Right click Receive Ports node
  • Select NewàOne-way Receive Port

  • Name the port
  • Click Receive Locations on the left panel
  • Click new to add a new Receive Location

  • Name the new receive location

  • Set Type dropdown to WCF-SQL
  • Set Receive pipeline to XMLReceive or any other custom pipeline
  • Click Configure button. You will get the following dialog

  • In the General tab, enter the SQL Server Address URI or click Configure. Clicking Configure shows the following dialog

  • Fill the following properties
    • Server name: for this walkthrough, I am using localhost because the SQL server is on the same machine as the dev box
    • InstanceName: leave blank if the instance name is the default instance
    • InitialCatalog: name of the database that contains the stored procedure
    • InboundId: use the stored procedure name. InboundId is used to make the URI unique. Biztalk requires the URI to be unique in an application. For more info read
  • Click OK
  • Go to the Binding tab and fill the following properties

    • XmlStoredProcedureRootNodeName : The adapter will insert a root element to the received schema with this name and the name space of XmlStoredProcedureRootNodeNamespace. Make sure that the name matches the name in the xml document
    • XmlStoredProcedureRootNodeNamespace: The namespace for the RootNode in the previous step to be injected by the adapter. Namespace must match the namespace in the xml document
    • InboundOperationType: Because our stored procedure contains FOR XML EXPLICIT, we must use XmlPolling
    • PolledDataAvailableStatement: The sql statement is executed by adapter to check if data is available for polling
    • PollingIntervalInSeconds: How often, in seconds, do we want to poll data from the database. The lower the number, the more frequent the adapter hits the database and the busier Biztalk application will be in case the data is available
    • PollingStatement: the sql statement to be executed to poll data from the database
    • pollWhileDataFound: Set to false. For more info read
    • UseAmbientTransaction: true to enable transactional behaviour
  • Configure the other tabs if needed
  • Click OK to finish configuring the receive location
  • Click OK to finish configuring the receive port
  • Now your port is ready for usage
Categories: Biztalk, Biztalk 2010, WCF Tags: