The term "Windows service" was officially introduced with the release of the .NET platform. It replaces the older "NT service" term you may have heard in the past. A Windows service is quite useful in situations where you need a program to run for long time periods and automatically start up when a computer is rebooted (even if a user has not logged into the system).
The Windows service that you’ll be introduced to in this sample application serves the purpose of watching a specific folder named xmlFeeds for XML documents that are dropped into the folder (through FTP, copy/paste, XCopy, etc.). The task of watching the folder is handled by the FileSystemWatcher class in the System.IO namespace. When XML files are dropped into the folder, the FileSystemWatcher instantiates a class named SQLGenerator that utilizes the XmlTextReader to parse the XML data and insert it into a database.
|