To use features of the Enterprise Library with your data provider, download Microsoft Enterprise Library from http://www.codeplex.com/entlib. The Enterprise Library installation by default includes the Enterprise Library documentation, which contains detailed information about using the application blocks.To enable Logging Application Block output, set the environment property DDTek_Enable_Logging_Application_Block_Trace to true. Alternatively, in the app.config file, set the EnableLoggingApplicationBlock AppSetting property to true.
1 Select Start / Programs / Microsoft patterns and practices / Enterprise Library 5.0 / Enterprise Library Configuration / EntLib Config .NET 3.5. The Enterprise Library Configuration window appears.
2
a Click the Logging Target Listeners plus sign button (). Then, select Add Logging Target Listeners / Add Flat File Trace Listener.
c Browse to the target location for the file. Then, type a file name for the trace listener file, and click Open. In this example, the file name is labtrace.log.
4 Click the plus sign button () to the right of the Categories heading; then, select Add Category. The Category section is expanded.
b Click the plus sign button () next to the Listeners heading. Then, select Flat File Trace Listener from the drop-down list.
7 Select File / Save As. The Save Configuration File window appears. Type a name for your configuration file. By default, the file is saved to C:\Program Files\Microsoft Enterprise Library 5.0\Bin\filename.exe.config, where filename is the name that you typed in the Save Configuration File window.The LAB that you configured must be added to the app.config or web.config file for your application.Table 4-1 describes settings you can use to enable and configure the data provider's interaction with the LAB.
Table 4-1. LAB Configuration Settings See “Specifying Enterprise Library Version Information in the .config File” for more information.