BizTalk Exception: HRESULT=”0x80040e57″ Description=”The statement has been terminated.” HRESULT=”0x80040e57″ Description=”String or binary data would be truncated.

Exception:

HRESULT=”0x80040e57″ Description=”The statement has been terminated.”
HRESULT=”0x80040e57″ Description=”String or binary data would be truncated.

Explanation:

This exception is occurred when we define FaultCode  more than 20 characters.

When we are using ESB management Portal for exception handling then ESB Exception on port level (Send & Receive Port) is directly stored in ESB management portal as well as ESB Database through checking Enable routing for failed message check box on port.

We can track exception in fault table in EsbExceptionDB.

But in exception handling in orchestration level, we need to define some of ESB context property to our self and send file to message box through direct binding from where ESB Application pick the file and upload on database as well as management portal.

below are details which are defiled in orchestration:

msg_Fault = Microsoft.Practices.ESB.ExceptionHandling.ExceptionMgmt.CreateFaultMessage();
msg_Fault.FailureCategory = “CategotyName”;
msg_Fault.FaultSeverity = Microsoft.Practices.ESB.ExceptionHandling.FaultSeverity.Severe;
msg_Fault.FaultCode = “FaultCode_name”;
msg_Fault.FaultDescription = exceptionObject.Message;

here exceptionObject should be catch exception object name or we can put custom exception description also.

And msg_Fault type should be Microsoft.Practices.ESB.ExceptionHandling.Schemas.Faults.FaultMessage defined under Orchestration Message folder.

Solution:

msg_Fault.FaultCode should be defined within 20 characters it should not be more than that otherwise we get above exception.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s