views:

18

answers:

1

Using asp.net 4.0, been trying to follow this:

http://msdn.microsoft.com/en-us/library/ms998306

Also tried using eventlogprovider and the mail provider. Silence. Is there anything I should know about healthmonitoring, like it doesn't work in 4.0?

Currently me web.config looks like this:

<healthMonitoring  enabled="true" heartbeatInterval="600">
  <providers>
   <clear/>
   <add name="EmailErrorProvider"
 type="System.Web.Management.SimpleMailWebEventProvider"
 to="[email protected]"
 from="[email protected]"
 buffer="false"
 subjectPrefix="An error has occured."
 bodyHeader="This email is generated from my application." />
   <add connectionStringName="MySqlConnection"
      maxEventDetailsLength="1073741823"
      buffer="true"
      bufferMode="Extra Critical Notification"
      name="MySqlWebEventProvider"
      type="System.Web.Management.SqlWebEventProvider,System.Web,Version=2.0.0 .0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" />
  </providers>
  <rules>
   <clear/>
   <add name="Testing Mail Event Providers"
 eventName="All Errors"
 provider="EmailErrorProvider"
 profile="Default"
 minInstances="1"
 maxLimit="Infinite"
 minInterval="00:01:00"
 custom=""/>
   <add name="Critical event"
     eventName="My Critical Event"
     provider="MySqlWebEventProvider"
     profile="Throttle"/>
  </rules>
  <eventMappings>
   <clear/>
   <add name="All Errors"
 type="System.Web.Management.WebBaseErrorEvent, System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
 startEventCode="0"
 endEventCode="2147483647"/>
   <add name="My Critical Event"
     type="MyWebEvents.MyCriticalEvent,MyWebEvents"/>
  </eventMappings>
  <profiles>
   <add name="Throttle"
     minInstances="1"
     maxLimit="1000"
     minInterval="00:00:01"/>
  </profiles>
  <bufferModes>
   <add name="Extra Critical Notification"
     maxBufferSize="10"
     maxFlushSize="5"
     urgentFlushThreshold="1"
     regularFlushInterval="Infinite"
     urgentFlushInterval="00:01:00"
     maxBufferThreads="1"
    />
  </bufferModes>
 </healthMonitoring>

Hope someone can help.

A: 

I have got it working following this tutorial. Please have a look at it.

Lorenzo
Thanks. Tried it. Didn't work. Something else is wrong.
Martin