Enterprise Library is a wonderful thing but come deployment you may end up in a situation where you spend more time on deployment than actual development so here are the complete steps to take when deploying a Enterprise Library enabled application.
Note: For simplicity’s sake I deploy the entire Enterprise Library regardless of what is actually used in the application.
1) Copy the Microsoft Enterprise Library binaries folder to the deployment server, usually Microsoft Enterprise Library\bin.
2) Run either InstallServices On Windows.bat or InstallServices On WinNT.bat depending on which folder Windows is located in. They need to be place in the Microsoft Enterprise Library\bin folder.
This step runs installutil on a couple of the assemblies which in turn create performance counters needed for Enterprise Library to run.
Note 1) Be sure to create any databases you need. E.g. the logging database sink.
Note 2) You may encounter errors in the EventLog saying something along the lines of, “Access to performance data was denied to ASPNET as attempted from C:\WINNT\Microsoft.NET\Framework\v1.1.4322\aspnet_wp.exe”. As you can tell from the message the ASP.NET worker prcess does not have access to the performance counters which luckily is easily remedied by following these steps:
- Open the "Computer Management" app
- Expand the "Services and Applications" section
- Right-click the "WMI Control" entry & select "Properties"
- Go to the "Security" tab
- Expand the "Root" node and then select the "WMI" node
- Click the "Security" button
- Add the "ASPNET" (or which ever account ASP.NET is running under) user & give it access