Download Developing an Efficient Application for the Distribution of Large Files
Transcript
Developing an Efficient Application for the Distribution of Large Files 45 5.2. Client Component Following are the installation instructions for the client component. 5.2.1. Requirements .NET Framework 3.5 (or later) must be installed on the target machine. 5.2.2. Installation The client does not require installation. It only needs the ImageDistributerClient.config file and the Lib folder containing the Enterprise Library Logging Application Block assemblies to be in the same folder as the executable. The client can be run on any machine in the domain, the only restriction is that the executing user must be in the group specified in the GroupName setting in both the client’s and the service’s configuration file. Obviously the configuration file of the client can be tampered with; nevertheless the service will not give access to unauthorized users. The setting in the client’s configuration only serves warning purposes. 5.2.3. Settings The settings of the component are stored in the .config file beside the executable. The following elements and their effects are considered significant: logConfiguration listeners logFilters system.serviceModel Contains elements controlling the methods of logging. In the default configuration only the errors are logged to a log file. The Enterprise Library (32) comes equipped with a graphical editor tool, but some of the settings can be easily modified by editing the following elements in a text editor. These objects tell the logger where to log the events. By default there is only one listener installed, namely a FlatFile TraceListener that logs to a text file, the filename is specified by the fileName attribute. There are two filters installed by default, the LogEnabled filter and the Category filter. Setting the enabled attribute of the LogEnabled filter to false disables logging completely. By default the Category filter is set to let through the log entries only from the “Error” category. Putting XML comment tags (<!-- -->) around the “add” element of the Category filter enables verbose logging by letting through log entries from every category. WCF related settings. These settings must match the settings in the service in order for the connection to be established. The main difference is that instead of being defined under the services element the endpoints are defined under the client element.