What should you do to makes sure that writing the XML message to the event log will not throw an exception?

You work in an international company which is named TXTWIN. And you’re in charge of the company network and use Microsoft BizTalk Server 2006 R2.
You create an orchestration which has a Scope shape. Several exception handling blocks are contained in the Scope shape. You log error information in each block to the Windows event log. In one of the blocks, you use the code below to write a large XML message to the event log. System.Diagnostics.EventLog.WriteEntry(XML Message, xmlMessage.OuterXml); Sometimes an XLANG exception is thrown when this XML message is logged. What should you do to makes sure that writing the XML message to the event log will not throw an exception?

You work in an international company which is named TXTWIN. And you’re in charge of the company network and use Microsoft BizTalk Server 2006 R2.
You create an orchestration which has a Scope shape. Several exception handling blocks are contained in the Scope shape. You log error information in each block to the Windows event log. In one of the blocks, you use the code below to write a large XML message to the event log. System.Diagnostics.EventLog.WriteEntry(XML Message, xmlMessage.OuterXml); Sometimes an XLANG exception is thrown when this XML message is logged. What should you do to makes sure that writing the XML message to the event log will not throw an exception?

A.
The code should be modified to be System.Diagnostics.EventLog.WriteEntry(Xml Message, xmlMessage);

B.
The code should be modified to be System.Diagnostics.EventLog.WriteEntry(Xml Message, xmlMessage.InnerText);

C.
You should truncate the information that is being written to the event log so that it does not exceed 32 KB.

D.
You should configure the Maximum log size property of the event log application that is being written to be 32 MB.

Explanation:
BURGOS: mnemo: “System.Diagnostics.EventLog.WriteEntry” = “truncate”



Leave a Reply 0

Your email address will not be published. Required fields are marked *