/
SimpleMailWebEventProvider.xml
150 lines (140 loc) · 7.46 KB
/
SimpleMailWebEventProvider.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<Type Name="SimpleMailWebEventProvider" FullName="System.Web.Management.SimpleMailWebEventProvider">
<TypeSignature Language="C#" Value="public sealed class SimpleMailWebEventProvider : System.Web.Management.MailWebEventProvider" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit SimpleMailWebEventProvider extends System.Web.Management.MailWebEventProvider" />
<TypeSignature Language="DocId" Value="T:System.Web.Management.SimpleMailWebEventProvider" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class SimpleMailWebEventProvider
Inherits MailWebEventProvider" />
<TypeSignature Language="F#" Value="type SimpleMailWebEventProvider = class
 inherit MailWebEventProvider" />
<TypeSignature Language="C++ CLI" Value="public ref class SimpleMailWebEventProvider sealed : System::Web::Management::MailWebEventProvider" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Web.Management.MailWebEventProvider</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Implements an event provider that sends email for event notifications.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
ASP.NET health monitoring allows production and operations staff to manage deployed Web applications. The <xref:System.Web.Management> namespace contains the health event types responsible for packaging application health-status data and the provider types responsible for processing this data. It also contains supporting types that help during the management of health events.
This class is not intended to be used from your code. It is created, configured and used by the ASP.NET health-monitoring system to send event notifications by email. You can define an event provider in a configuration file, as demonstrated in the Example section of this topic.
This provider has a comprehensive set of configuration attributes that you can use to customize the way it works.
## Examples
The following configuration file excerpt shows how to specify a provider of type <xref:System.Web.Management.SimpleMailWebEventProvider> in the `healthMonitoring` section. The `add` elements in the `rules` section specify that the provider will handle request-processing errors and infrastructure errors.
```
<healthMonitoring
enabled="true"
heartBeatInterval="0">
<bufferModes>
<add name="Critical Notification"
maxBufferSize="100"
maxFlushSize="20"
urgentFlushThreshold="1"
regularFlushInterval="Infinite"
urgentFlushInterval="00:01:00"
maxBufferThreads="1"
/>
</bufferModes>
<providers>
<add name="CriticalMailEventProvider"
type="System.Web.Management.SimpleMailWebEventProvider,
System.Web, Version=%ASSEMBLY_VERSION%, Culture=neutral,
PublicKeyToken=%MICROSOFT_PUBLICKEY%"
from="sender address"
to="someone@example.com"
cc="someone@example.com
bcc="someone@example.com"
priority="High"
bodyHeader="Warning!"
bodyFooter="Please investigate ASAP."
subjectPrefix="Action required."
buffer="true"
bufferMode="Critical Notification"
maxEventLength="4096"
maxSize="4096"
maxMessagesPerNotification="1"
/>
</providers>
<eventMappings>
<add name="Request Processing Events"
type="System.Web.Management.WebRequestEvent, System.Web,
Version=%ASSEMBLY_VERSION%, Culture=neutral,
PublicKeyToken=%MICROSOFT_PUBLICKEY%"
/>
<add name="Infrastructure Errors"
type="System.Web.Management.WebErrorEvent, System.Web,
Version=%ASSEMBLY_VERSION%, Culture=neutral,
PublicKeyToken=%MICROSOFT_PUBLICKEY%"
/>
</eventMappings>
<profiles>
<add name="Default"
minInstances="1"
maxLimit="Infinite"
minInterval="00:10:00"
/>
<add name="Critical"
minInstances="1"
maxLimit="1024"
minInterval="00:00:00"
/>
</profiles>
<rules>
<add name="Request Processing Errors"
eventName="Request Processing Errors"
provider="CriticalMailEventProvider"
profile="Default"
/>
<add name="Infrastructure Notifications"
eventName="Infrastructure Errors"
provider="CriticalMailEventProvider"
profile="Critical"
/>
</rules>
</healthMonitoring>
```
]]></format>
</remarks>
<altmember cref="T:System.Web.Management.WebEventProvider" />
<altmember cref="T:System.Web.Configuration.HealthMonitoringSection" />
<altmember cref="T:System.Web.Management.MailWebEventProvider" />
<related type="Article" href="https://msdn.microsoft.com/library/ab894e83-7e2f-4af8-a116-b1bff8f815b2">Installing and Configuring ASP.NET Providers</related>
</Docs>
<Members>
<Member MemberName="Initialize">
<MemberSignature Language="C#" Value="public override void Initialize (string name, System.Collections.Specialized.NameValueCollection config);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void Initialize(string name, class System.Collections.Specialized.NameValueCollection config) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.Management.SimpleMailWebEventProvider.Initialize(System.String,System.Collections.Specialized.NameValueCollection)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Sub Initialize (name As String, config As NameValueCollection)" />
<MemberSignature Language="F#" Value="override this.Initialize : string * System.Collections.Specialized.NameValueCollection -> unit" Usage="simpleMailWebEventProvider.Initialize (name, config)" />
<MemberSignature Language="C++ CLI" Value="public:
 override void Initialize(System::String ^ name, System::Collections::Specialized::NameValueCollection ^ config);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="name" Type="System.String" />
<Parameter Name="config" Type="System.Collections.Specialized.NameValueCollection" />
</Parameters>
<Docs>
<param name="name">The name of this event provider.</param>
<param name="config">A <see cref="T:System.Collections.Specialized.NameValueCollection" /> that specifies configuration settings for this event provider.</param>
<summary>Sets the initial values for this object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method is not intended to be used directly from your code. It is called by the ASP.NET health-monitoring system.
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>