I’m using EF 4.1. Whenever an error occurs during the execution of a DbContext operation like SaveChanges() I consistently receive a rather cryptic error message: System.Exception._ComPlusExceptionCode -532462766. Obviously this is not very helpful for finding out what went wrong. A quick Google search for ComPlusException in context with EF returned no meaningful results.
Any ideas why I receive this error message and what can be done in order to get a more descriptive error feedback would be much appreciated.
Thanks!!
Code:
public void InsertTarget(Target target)
{
try
{
_tgrContext.Targets.Add(target);
_tgrContext.SaveChanges();
}
catch (Exception)
{
throw;
}
}
Found the answer to the problem here:
complusexceptions in net
In short: Visual Studio decodes the complusexception code into the actual error message on click at the red error quation mark in the VS code editor. I hardly ever use this visual indicatior, so I guess it was easy to miss for me.