Using Configuration Files

Using a resource file to store configuration information is not always the best solution. Therefore we will implement once last change to the service: We will add a configuration file.

Actually, we will create two configuration files. The first will be the application-specific configuration file that is supported by default in all .NET applications. This is where system and technology settings modify the behavior of the application. The other configuration file is an application-processing configuration file that will store information for preparing the options that the service will use to perform its tasks. Currently, we have three such options: Input, Output, and FileType.

We will use XML for both the application-processing ...

Get Programming Windows® Services with Microsoft® Visual Basic® 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.