Friday, July 1, 2011

Error for Solicit-response send port using HTTP/SOAP adapter

Event Type:   Error
Event Source: BizTalk Server 2006
Event ID:       5754
Description:
A message sent to adapter "HTTP" on send port "<SendPortName>" with URI "<URL>" is suspended.
 Error details: The underlying connection was closed: An unexpected error occurred on a receive.

You can get the similar error for SOAP adapter too.

Cause
On production environment this error was occurring randomly once or twice in a month. After lot of investigation I came to know that the AppPool was getting recycled before Web Page can respond to the request.
Though there are no of reasons for AppPool recycle but in this case the IIS was hosted on a machine having sufficient resources(memory,CPU). I figured out that the app pool used for web application was configured to get recycled after 1740 minutes (which is default setting when you create new App Pool).

Resolution
Open the Internet Information Services (IIS) Manager go to Application Pool  and open the properties of the required application pool. Uncheck the "Recycle worker processes (in minutes):" check box.


Cheers
Rohit Sharma

Wednesday, June 29, 2011

Error for Solicit-response send port using HTTP adapter

Event Type:   Error
Event ID:       5754
Description:
A message sent to adapter "HTTP" on send port "<SendPortName>" with URI "<URL>" is suspended.
Error details: The HTTP send adapter cannot complete the transmission within the specified time.
Cause
This error occurred for Solicit-response send port when the HTTP adapter does not receive the response within the time specified for Request timeout. The default value for Request timeout is 0 and in this condition the BizTalk Messaging Engine calculates the time-out based on the request message size.
Resolution
Set the value of Request timeout for send handler created for HTTP adapter then this change will affect all the send ports. or
You also have the option to set the value of Request timeout for a particular send port in HTTP Transport Properties.

Cheers
Rohit Sharma

Friday, June 24, 2011

Could not load file or assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

When trying to browse my WCF service using .Net Framework 4.0 and hosted in IIS 6.0 I was getting this error in the event viewer.

Event Type:         Error
Event Source:     ASP.NET 4.0.30319.0
Event Category:  None
Event ID:            1325
Description:
Failed to initialize the AppDomain:/LM/W3SVC/1381374284/Root/RetrieveDataService
Exception: System.IO.FileLoadException
Message: Could not load file or assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Access is denied.
StackTrace:    at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(String assemblyName, String typeName)
   at System.AppDomain.CreateInstance(String assemblyName, String typeName)
   at System.AppDomain.InternalCreateInstanceWithNoSecurity(String assemblyName, String typeName)
   at System.AppDomain.InternalCreateInstanceWithNoSecurity(String assemblyName, String typeName)
   at System.Activator.CreateInstance(AppDomain domain, String assemblyName, String typeName)
   at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)
   at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)

Resolution
Because the Application Pool was using the identity NETWORK SERVICE so I had to give the IIS_WPG group (which contains NETWORK SERVICE) read/write access to my web root directory.

Wednesday, February 2, 2011

The time out errors

All of a sudden on production environment of client the messages start getting suspended and I got a call in early morning to look into this. The event log was full of these warning and error messages.
Event Type:       Error
Description:
A message sent to adapter "SOAP" on send port "<PortName>" with URI "<WebServiceURL>" is suspended.
 Error details: WebException: The operation has timed out
In this case the above WebServiceURL is pointing to an orchestration exposed as web service.
Event Type:       Warning
Event Source:   ASP.NET 2.0.50727.0
Description:
Event code: 3001
Event message: The request has been aborted.
Exception information:
    Exception type: HttpException
    Exception message: Request timed out.

 Event Type:      Error
Description:
A response message sent to adapter "SOAP" on receive port "<ReceivePortName>" with URI “” is suspended.
 Error details: Safe handle has been closed
Event Type:       Error
Description:
A response message sent to adapter "SOAP" on receive port ""<ReceivePortName>" with URI “" is suspended.
 Error details: The original request has timed out. The response arrived after the timeout interval and it cannot be delivered to the client.
Cause:
The above details were pointing that something is wrong with BizTalk and it starts taking lot of time to receive the message. After investigating it further it was found that the account used for running the SQL Server agent was disabled resulting in the size of the MessageBox increased to 1.7 GB as the jobs for maintaining the message box were not running.

Cheers
Rohit Sharma

Monday, January 31, 2011

FTP adapter issue: Unable to receive the file ""

I was working on a client application where I need to receive files from FTP server. The following are main points of this application
·         Based on the history I figured out the maximum size of file could up to 5KB (not to big).
·         A single host instance was created for the host specified as receive handler for FTP adapter.
Problem:
Duplicate files were getting received with the following messages in event log.
Event Type:     Warning
Description:
The adapter "FTP" raised an error message. Details "Unable to receive the file "<FileName>" from the FTP server.  The error that occurred was "A stream read or write operation failed because the stream is in an error state. ". ".
Event Type:     Error
Description:
There was a failure executing the receive pipeline: "Microsoft.BizTalk.DefaultPipelines.PassThruReceive, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "Pipeline " Receive Port: "<ReceivePortName>" URI: "<URI>" Reason: Unable to receive the file "<FileName>" from the FTP server.  The error that occurred was "A stream read or write operation failed because the stream is in an error state. ".
I noticed that this error is occurring only when the number of files are more than 120 i.e. when the connection need to be opened for some long time. After going through the FTP log it seems as connection was getting terminated before all the files get transferred.
Work around:
After changing the Mode to ‘Passive’ the issue gets resolved.
Possible Cause:
One possible cause of it could be that the firewall is causing this error but I have not investigated the firewall settings yet.

Cheers
Rohit Sharma

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