I am trying to enhance error handling in a biztalk orchestration. When a update fails, I will email user indicating the failure. I added a reference to MSCORLIB.DLL and added a construct message (see below)
The orchestration I added this to is a Status_Update Orchestration. I deployed the app on our QA server and got the message noted below in my Job_Create orchestration.
I Deleted the app and installed an older version of the MSI and bindings and continue to get the error.
Any help will be appreciated.
Error message
Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'NWNatural.BizTalk.EAM.SAP_PCAD_JobCreate_Orchestration(d945bef6-daf3-f2e8-845f-e3e0155e6ce1)'.
The service instance will remain suspended until administratively resumed or terminated.
If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
InstanceId: d3d6e295-50c9-4c35-a583-57e3dd68807e
Shape name: ConstructMsgException
ShapeId: 1bccf487-7968-443e-ae6f-911e103a44ce
Exception thrown from: segment 3, progress 3
Inner exception: Requested registry access is not allowed.
Exception type: SecurityException
Source: mscorlib
Target Site: Void ThrowSecurityException(System.ExceptionResource)
The following is a stack trace that identifies the location where the exception occured
at System.ThrowHelper.ThrowSecurityException(ExceptionResource resource)
at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
at System.Di
Construct message :
msgBody = new System.Text.StringBuilder();m
msgBody.AppendLine("<html><body>");
msgBody.AppendLine("<html><body><table border=\"0\" cellpadding=\"2\" cellspacing=\"0\">");
msgBody.AppendLine("<tr><td colspan=\"2\"><font face=\"Verdana\" size=\"2\"><b>ERROR DETAILS</b></font></td></tr>");
msgBody.AppendLine("<tr>");
msgBody.AppendLine("<td width=\"145\"><font face=\"Verdana\" size=\"2\">Error Type:</font></td>");
msgBody.AppendLine("<td><font face=\"Verdana\" size=\"2\">" + "Order Locked " + "</font></td>");
msgBody.AppendLine("</tr><tr>");
msgBody.AppendLine("<td colspan=\"2\"><font face=\"Verdana\" size=\"2\">The attached document failed on processing in BizTalk Server</font></td>");
msgBody.AppendLine("</tr></table></body></html>");
Msg_Email.EmailBody = new NWNatural.BizTalk.XlangCustomFormatters.RawString(msgBody.ToString());
Msg_Email.EmailBody(Microsoft.XLANGs.BaseTypes.ContentType) = "text/html";
Msg_Email.OriginalMessage = null;
Msg_Email(SMTP.Subject) = "SAP Order Locked " + "ORDER # HERE";
Msg_Email(SMTP.From) = "SLF@NWNatural.com";
Msg_Email(SMTP.EmailBodyFileCharset) = "UTF-8";
Msg_Email(SMTP.MessagePartsAttachments) = 2;