ASP.NET Health Monitoring 404 Event
问题 Does HealthMonitoring have a built-in event that catches 404 errors? I have tried setting up all events (by using webBaseEvent) and I've searched for two days, but I cannot find or trigger an event for a file not found. I could create my own, but was hoping there was a built in event. 回答1: No, it doesn't. You'd have to create a custom event (from webrequesterrorevent) to have HM track it for you. How to: Something like this (from memory) in Application_Error in global.asax - public void