Posts Tagged ‘cocreate’

strange .net runtime error and the fix

July 20, 2011

We had done a POC for Foglight by Quest back in March and ended up not purchasing the product because we already had SCOM in place. After the uninstall and ever since, we have had some issues.

  • errors logged whenever an app pool starts/restarts containing this description
  • .NET Runtime version 2.0.50727.3603 – Failed to CoCreate profiler.
  • .net health monitoring would log an app pool start but not log an app pool stop or shutdown
  • I had the suspicion that this was related to random app pool restarts during the day on one of our webservices
  • other debuggers would not attach to an app pool and work (like avicode that comes with SCOM)
  • I looked for how to fix this since March, of course I was too stubborn to call Quest, so that’s my fault. Much googling didn’t resolve much so when I finally did figure this out, I wanted to post what I found. It turns out that debugging is set in an environment variable. Seems like it’s a session variable because it’s set in the parameters of a service, so that way it runs with the service in the user context of the service. This is something I had never run across before so it seemed kinda odd.

    In the end we had to remove the reg key “Environment” (and the contents of the key) from the two locations. This key is what sets the debugger to enabled and tells it which debugger to use.

    • [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesW3SVC]
    • [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesIISADMIN]

    Once these have been deleted, all you have to do is IISRESET the server and the error is gone and random app pool restarts have ceased. As of this writing I have not tried to reinstall the SCOM AVIcode to the webservice, but I’m certain that it will work now.

    Advertisements