exam questions

Exam 70-486 All Questions

View all questions & answers for the 70-486 exam

Exam 70-486 topic 1 question 67 discussion

Actual exam question from Microsoft's 70-486
Question #: 67
Topic #: 1
[All 70-486 Questions]

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.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
ApplicationDetailCodeBase: Identifies the offset for the applicationdetail 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

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Aghie
Highly Voted 5 years, 10 months ago
According to this: https://docs.microsoft.com/en-us/previous-versions/ms227545(v=vs.140) it should be .WebExtendedBase + 30
upvoted 19 times
...
TinaZh
Highly Voted 5 years, 5 months ago
It sould be WebExtendedBase "When you raise a custom Web event, you must specify an event code that is greater than System.Web.Management.WebEventCodes.WebExtendedBase." https://docs.microsoft.com/en-us/previous-versions/msp-n-p/ff650305(v=pandp.10)?redirectedfrom=MSDN#step-4-instrument-your-application
upvoted 9 times
...
bitshift
Most Recent 4 years, 8 months ago
I've tried it, WebExtendedBase is 100,000, the other two codes are lower, and anything under 100,000 will throw an exception on the call to Raise().
upvoted 1 times
...
JftCoCo
5 years, 1 month ago
I agree the answer is WebExtendedBase. https://docs.microsoft.com/en-us/dotnet/api/system.web.management.webeventcodes.webextendedbase?view=netframework-4.8
upvoted 2 times
...
hungry_ape9000
5 years, 1 month ago
FINAL ANSWER: .WebExtendedBase + 30 .Raise()
upvoted 5 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...