Since you specified that the service will execute in the context of a user account, the installer prompts you for the user's credentials (see Figure 14).
Figure 14. Set Service Login Dialog Box Superimposed Over the Installer Window
Although the service is set to start automatically, it does not do so after installation. It will start automatically after a reboot. You could add code to make it start automatically after installation, but to keep things simple, use the Services applet from Administrative Tools to start the service initially (see Figure 15).
Figure 15. Select the Monitor Service and Click Start
You can stop the service and change entries in the MonitorService.exe.config file and restart the service to have it use the new values, such as IntervalMsec. To force a connection failure during testing, change the name of the server in a connection string to an invalid server name.
Power and Ease of Use in .NET 2.0
You have seen some of the .NET Framework 2.0's powerful yet easy-to-use features in action:
When you use its ConfigurationManager class with an application configuration file, you eliminate the need to recompile after changing application parameters and settings, which reduces brittleness.
DbFactory classes further reduce brittleness by making data-access code provider agnostic.
Generic lists simplify code by providing simple-to-use abstractions in code.
The System.Net.Mail namespace greatly simplifies the task of sending mail from an application.
Windows Services allow durable applications to be built.