Showing posts with label WCF. Show all posts
Showing posts with label WCF. Show all posts

Wednesday, January 26, 2011

Problem faced in consuming the orchestration exposed as WCF service in BizTalk server 2010

In BizTalk server 2010 I published an orchestration as WCF service using the ‘BizTalk WCF Service Publishing Wizard’. The orchestration gets published successfully. After configuring and starting the orchestration when trying to consume the WCF service, I was getting following errors:
In the client code consuming the WCF service exception was
The server was unable to process the request due to an internal error.  …
In the event log on the BizTalk machine:
Error:
There was a failure executing the receive pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLReceive, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "XML disassembler" Receive Port:
The document specification ‘..’  from assembly ‘..’ failed to load. Verify the schema for this document specification is deployed and is in the Global Assembly Cache.
Warning:
The adapter "WCF-WSHttp" raised an error message. Details "System.TimeoutException: The service's security session did not receive a 'close' message from the client within the configured timeout (00:00:10)….
I verified that the assembly containing schema was deployed to GAC and I was facing the same issue after increasing the timeout value for Open,Send and Close for WS-Http receive location.
Solution
Based on the error received in the client code I tried to investigate the WCF service deployment in IIS 7. The actual problem was the application pool used for WCF service was using .Net Framework v2.0.50727 after changing it to v4.0.30319 the issue got resolved.
Cheers
Rohit Sharma

Exception: Root element is missing for a Metadata only endpoint for WCF-Http receive location


In BizTalk 2010 I created a WCF-WSHttp receive location. Then using the BizTalk WCF Service Publishing Wizard I created a meta data only endpoint, based on my WCF-WSHttp receive location and I added the required schema. The WCF service was created successfully. The application Pool used for this WCF service was configured using the identity having access to BizTalk databases.
When I tried to see the WSDL I got the exception: “Root element is missing”.
To resolve this issue I have to do the following two extra steps:
1.  Added the account used for application pool to BizTalk Server Administrators group
2. Added the following line to the Web.Config of WCF services created with the BizTalk WCF Service Publishing Wizard.
<system.web>
          <trust level="Full" originUrl="" />
<system.web>
For additional information refer to this MSDN link.

Cheers
Rohit Sharma