Web App Development

Tuesday, May 13, 2008

Failed to fire the WMI event

Error

Failed to fire the WMI event 'SecurityAuthorizationCheckEvent'. Exception: System.Management.ManagementException: Access denied

Platform

W2k3, ASP.NET 2.0, Enterprise Library 2.0

Cause

Enterprise library uses various instrumentation blocks (WMI events, event log, and performance counters). These instrumentation blocks are not configured during install

How to Fix It

There are 3 ways to do it:

  1. Run the "Install Services" script from the Enterprise Library folder on the Start Menu (this launches InstallServices.bat). You need administrator privileges to run this script.
  2. Run the .NET installutil utility over the Enterprise Library assemblies you are using for your application (requires administrator privileges as well)
  3. cd C:\WINNT\Microsoft.NET\Framework\v1.1.4322

    installutil "C:\Program Files\Microsoft Enterprise Library\bin\Microsoft.Practices.EnterpriseLibrary.Common.dll"
    installutil "C:\Program Files\Microsoft Enterprise Library\bin\Microsoft.Practices.EnterpriseLibrary.Caching.dll" installutil "C:\Program Files\Microsoft Enterprise Library\bin\Microsoft.Practices.EnterpriseLibrary.Configuration.dll" installutil "C:\Program Files\Microsoft Enterprise Library\bin\Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.dll"
    installutil "C:\Program Files\Microsoft Enterprise Library\bin\Microsoft.Practices.EnterpriseLibrary.Data.dll"
    installutil "C:\Program Files\Microsoft Enterprise Library\bin\Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll"
    installutil "C:\Program Files\Microsoft Enterprise Library\bin\Microsoft.Practices.EnterpriseLibrary.Logging.dll"
    installutil "C:\Program Files\Microsoft Enterprise Library\bin\Microsoft.Practices.EnterpriseLibrary.Security.dll"


  4. If you do not have administrator privileges to run the above scripts, then you can do a conditional compile of the Enterprise Library solution:

    Open up the EnterpriseLibrary.sln
    Modify the Configuration Properties\Build\Conditional Constants of the EnterpriseLibrary.Common project.
    Remove the USEWMI;USEEVENTLOG;USEPERFORMANCECOUNTER constants.

    These constants removed, instrumentation is now disabled. Recompile your enterprise library package and use it in your application.

Labels: ,

0 Comments:

Post a Comment

<< Home