Expose Orchestration as WCF Service – Errors – Resolutions

Error 1 :

Receive location for address “/ExposeOrchWCFService/ExposeOrchWCFService_ProcessPO_prtRcvPO.svc” not found. (The BizTalk receive location may be disabled.)


WCF Service Publishing Wizard will create a new Receive location in the application you have specified in the wizard. That receive location need to be enabled.

Error 2:

Cannot open database “BizTalkMgmtDb” requested by the login. The login failed.
Login failed for user ‘NT AUTHORITY\NETWORK SERVICE’.


This happens when you create Orchestration and expose as WCF Service. The WCF Publishing Wizard will create Website in IIS. If newly created application is running under ASP.Net 4.0 Application pool, you will see this error while browsing the .svc file.  All you need to do is to change the Application Pool to WCFHttpAppPool

Error 3:

The requested service, ‘http://localhost/ExposeOrchWCFService/ExposeOrchWCFService_ProcessPO_prtRcvPO.svc’ could not be activated. See the server’s diagnostic trace logs for more information.


Check whether BizTalk Orchestration and application is started.

The Messaging engine failed to process a message submitted by adapter:WCF-BasicHttp

Error Message:

The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on
the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs.

The Messaging engine failed to process a message submitted by adapter:WCF-BasicHttp Source
URL:/ExposeOrchWCFService/ExposeOrchWCFService_ProcessPO_prtRcvPO.svc. Details:The published message could not be routed because no subscribers were found. This error occurs if the subscribing orchestration or send port has not been enlisted, or if some of the message properties necessary for subscription evaluation have not been promoted. Please use the Biztalk Administration console to troubleshoot this failure.


Receive Port ID for the tight coupled orchestration with the Receive port is different that the one which was created by WCF Service publising wizard. You need to change Receive Port configuration to Direct.



Use of unconstructed message ‘messageName’

Compile Error:

use of unconstructed message ‘messageName’


If you have 1 message in orchestration, and you are using map to construct message out of same schema then you encounter this error.


Change you logic to use 2 schema or create 2 message variable for the same message.

Exposing Orchestration as WCF Service – Notes

Exposing Orchestration as WCF Service – Notes

Orchestration with Receive and Send as two different Port (One-Way):

If you create an orchestration with independent Receive and Send Ports, then WCF Service Wizard will create void as return type for the client Service Reference.

You need to use WCFHttpPool to host the Orchestration in IIS.

WCF publishing wizard will create a new WCF-BasicHttp receive location. It will be a one-way receive location. This port will be running under BizTalk Isolated Host Instances.

WCF Publishing wizard will create a large text as the service reference name like
<Name Given As Service Reference Namespace>.<OrchProjectName_OrchestrationName_ReceivePort Name>.

By default, WCF Publishing Wizard creates BasicHttpBinding_ITwoWayAsynVoid as interface type name for WCF Service.

You need make sure the Receive Port is configured as Direct Binding.

Code for Calling WCF from Console Application:

RcvProcessPO.ExposeOrchWCFService_ProcessPO_prtRcvPOClient client = new
RcvProcessPO.PurchaseOrder po = new RcvProcessPO.PurchaseOrder();
po.PONum = “7002”;
po.PODate = “09/09/2015”;
po.POAmount = “1200”;
po.POQty = “120”;

Two way – Request Response port in Orchestration:

Make sure Request Response port is configured in Orchestration, and it should be bind directly to the Message Box.

Check WCFHttpPool application pool identity user has permission to biztalk databases.

Verify value passed to the client function is of reference type and you need to pass it as ref.

It will be difficult to stop port/location to examine the context or messages in BizTalk. Since it is Request Respond Receive Location, you cannot stop it. Even if you stop, WCF service will not be invoked at it says “Receive location is disabled”

Code for calling Request Response WCF from Console Application:

CalculatePOAmount.ExposeOrchReqResp_CalculatePOAmount_prtCalculatePOAmountClient client = new

CalculatePOAmount.CalculatePOAmountRequest req = new CalculatePOAmount.CalculatePOAmountRequest();

CalculatePOAmount.PurchaseOrder po = new CalculatePOAmount.PurchaseOrder();

po.PONum = “4567”;
po.PODate = “09/09/2015”;
po.POQty = “12”;
po.POUnitPrice = “100”;

CalculatePOAmount.CalculatePOAmountResponse resp = new CalculatePOAmountResponse();
resp.PurchaseOrder = po;
client.CalculatePOAmount(ref po);
resp.PurchaseOrder = po;

Console.WriteLine(” The calculated PO Amount = {0}”, resp.PurchaseOrder.POAmount.ToString());




MessageContextPropertyBase vs MessageDataPropertyBase vs PartContextPropertyBase

MessageContextPropertyBase vs MessageDataPropertyBase vs PartContextPropertyBase

By default, none of the value for the property schema base will be selected. But even though you have not selected anything, once you promote a field and assign it to promoted property field in Property Schema, property schema base value will be
“MessageDataPropertyBase” by default when deployed.

If you select the property schema base as MessageContextPropertyBase, then it will be added to the context property of the message but not promoted. To promote the field you need to use custom pipeline component to add that to promoted property field.

To use MessageDataPropertyBase promoted field value, you need to create an instance of the message and use it, where as MessageContextPropertyBase value can be accessed without creating an instance of the message. This behavior is similar to the static variable in any programming language.

So many times, I have wondered how to have a global variable assigned, while doing BizTalk Process. If you think little bit aloud and you can treat this MessageContextPropertyBase as global variable. But you have to make sure, this gets added to the newly created message or you have to get it in local variable. When you need to pass to another orchestration, you can do so by passing it as an Orchestration Parameter.


PartContextPropertyBase is used for setting context properties for individual Message Parts of a Multipart Message. A multipart message can have more than one part.

It is similar to MessageContextPropertyBase and works on Multipart Messages


Related Links:



BizTalk, WCF, ESB ToolKit, Windows Azure


Middleware, Services, and Integration

Azure Thoughts, EAI Challenges

BizTalk, WCF, ESB ToolKit, Windows Azure

Journey Towards Destiny

Journal of IT Experience

Vijay Data Science

Random Rumblings related to DataScience

MSDN Magazine (en-us)

BizTalk, WCF, ESB ToolKit, Windows Azure

Sandro Pereira BizTalk Blog

My notes about BizTalk Server 2004, 2006, 2006 R2, 2009, 2010, 2013 and now also Windows Azure BizTalk Services.

BizTalk360 Blog

BizTalk, WCF, ESB ToolKit, Windows Azure

Ned Analytics

BizTalk, WCF, ESB ToolKit, Windows Azure

Richard Seroter's Architecture Musings

Blog Featuring Code, Thoughts, and Experiences with Software and Services