DRAG DROP
You are developing an ASP.NET web application that uses health monitoring to log events to the
Windows Event Log. The application contains a custom event that is defined in the following code
segment. Line numbers are included for reference only.
You need to ensure that the event is correctly added to the Windows event log.
How should you complete the relevant code? To answer, drag the appropriate code segment to the
correct location or locations. Each code segment may be used once, more than once, or not at all.
You may need to drag the split bar between panes or scroll to view content.
Answer: See the explanation
ApplicationDetailCodeBase: Identifies the offset for the application detail event codes. This field is
constant.
WebRequestEvent.Raise()
Raises an event by notifying any configured provider that the event has occurred. (Inherited from
WebBaseEvent.)
https://msdn.microsoft.com/en‐
us/library/system.web.management.webrequestevent(v=vs.110).aspx
Is the answer correct? Can’t find any Microsoft docs to prove one way or the other…
Seems to be WebExtendedBase and not ApplicationDetailCodeBase.
Raising Custom ASP.NET Health Monitoring Events Example:
https://msdn.microsoft.com/en-us/library/ms227545.aspx
WebEventCodes.WebExtendedBase : Identifies the offset for the custom event codes. This field is constant.
https://msdn.microsoft.com/en-us/library/system.web.management.webeventcodes.webextendedbase(v=vs.110).aspx
Good reference. Looks like you are right.
Thanks.
This reference clarifies some things.
Description for the fields:
WebExtendedBase – Identifies the offset for the custom event codes. This field is constant.
ApplicationCodeBase – Identifies the offset for the ASP.NET health-monitoring application event codes. This field is constant.
ApplicationDetailCodeBase – Identifies the offset for the application detail event codes. This field is constant.
According to this, WebExtendedBase should be correct.
And Raise should be the second one.
Can anybody confirm what is the correct answer please??