In Short:

if you ever get a exception like “_COMPlusExceptionCode = x” in a .net application while you are debugging it in visual studio, look at the following screenshots.

Long Story:

While working on a asp mvc project i got a exception when the EF was trying to save some changes to the db. so i examined the exception object via visual studio’s visual aids. it said _COMPlusExceptionCode = -532459699 ! now what is that?

complusexception while debugging in visual studio

complusexception while debugging in visual studio

after some googling… i felt a bit lost. but by accident i came across the following error message in the same application, in the same line no, for the same exception. a usual ‘exception icon’ or whatever you call it.

a exception icon displayed in visual studio

a exception icon displayed in visual studio

now when i click on that…

visual studio exception infomation dialog been displayed for a update exception

visual studio exception infomation dialog been displayed for a update exception

viola! there is my exception. it seems that visual studio decodes these COM Plus Exception Codes to meaningful exceptions. but at times its easy to miss this way of viewing the exception.


  1. Gary S

    I have the exact same error. Were you able to figure out what caused the exception in the first place?

    • yasi8h

      Hi Gray,
      in my case i was trying to save a entity that had ilegile values set to some of it’s properties. i had some invalid DateTime values set. but it can be anything really. did you look at the inner exception and the stack trace? i was able to figure out whats going wrong by looking at the inner exception in my case.

  2. Loco Minera

    I was having trouble trying to figure out what my exception code was and never saw that stupid icon until reading your post. Thanks! It saved a lot of time.

    • yasi8h

      yeah i know. sometimes you just can’t see that little icon! i have wasted a lot of time searching for ‘com exception -212314125′ online because of it! :)




Leave a Comment