tailieunhanh - Professional ASP.NET 3.5 in C# and Visual Basic Part 67
Professional in C# and Visual Basic Part 67. Building on the revolutionary release, adds several key new developer features including AJAX, LINQ, and a new CSS designer in Visual Web Developer 2008. The dramatic reduction in code that developers realized from the more than 50 new server controls in now allows developers the time to make their applications more interactive with AJAX, to work with data in their preferred language with LINQ, and to build visually attractive and consistent standards-based sites with CSS. . | Chapter 12 Introduction to the Provider Model -- Removed for clarity -- eventMappings healthMonitoring configuration In this example the errors that occur are captured and not only written to the event log but are also e-mailed to the end users specified in the provider definition. One very interesting point of the SimpleMailWebEventProvider is that this class inherits from the BufferedWebEventProvider instead of from the WebEventProvider as the EventLogWebEventProvider does. Inheriting from the BufferedWebEventProvider means that you can have the health monitoring system build a collection of error notifications before sending them on. The bufferModes section defines how the buffering works. The aforementioned SimpleMailWebEventProvider does exactly what its name states it sends out a simple text-based e-mail. To send out a more artistically crafted e-mail that contains even more information you can use the TemplatedMailWebEventProvider. Just like the SimpleMailWebEventProvider you simply define the provider appropriately in the healthMonitoring section. The model for this is presented in Listing 12-19. Listing 12-19 The TemplatedMailWebEventProvider definition providers clear add name EventLogProvider type Version Culture neutral PublicKeyToken b03f5f7f11d50a3a add name TemplatedMailProvider type Version Culture neutral PublicKeyToken b03f5f7f11d50a3a template . mailtemplates from website@ to admin@ cc adminLevel2@ bcc director@ bodyHeader Warning bodyFooter Please investigate ASAP. subjectPrefix Action required. buffer true bufferMode Website Error Notification maxEventLength 4096 maxMessagesPerNotification 1 providers The big difference between this provider declaration and the .
đang nạp các trang xem trước