電子メール通知を処理するためのカスタム構成セクションを作成する必要があります。カスタムASP.NET構成セクション
<configSections>
<sectionGroup name="notifications">
<section name="notification" type="NotificationConfiguration" allowLocation="true" allowDefinition="Everywhere" />
</sectionGroup>
</configSections>
...
<notifications>
<notification name="..." enabled="..." delayInMinutes="...">
<recipients>
<add email="..." />
<add email="..." />
<add email="..." />
</recipients>
</notification>
<notification name="..." enabled="..." delayInMinutes="...">
<recipients>
<add email="..." />
<add email="..." />
<add email="..." />
</recipients>
</notification>
</notifications>
...
は、私は、これは罰金NotificationConfiguration config = (NotificationConfiguration) ConfigurationManager.GetSection("notifications\notification")
を使用して仕事を得ることができますが、これは一個の<notification>
要素の食料調達:設定は、次の形式である必要があります。複数の通知を受け取るために複数の要素を達成するにはどうすればよいですか?
これを処理するクラスは、非常に長いので、私はここに貼り付けていないだろうが、それは、ここからダウンロードできます。
http://files.getdropbox.com/u/288235/NotificationConfiguration.cs
感謝。
更新された回答を確認してください。 – Kirtan