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: ,

Monday, May 05, 2008

ORA-06502: PL/SQL: numeric or value error

If you are trying to use ODP.NET for your ASP.NET application, you may run into some compatibility with the version you are trying to use. For example, I ran into an issue trying to use the 11g provider for our Oracle 9i database server - ORA-06502: PL/SQL: numeric or value error

Resolution

Use the version release of ODP.NET that matches your database server version. We uninstalled the 11g provider and everything worked fine!

Link to ODP.NET

http://www.oracle.com/technology/tech/windows/odpnet/index.html

Labels: , , , , ,