No parameterless constructor defined for this object.

This error message started showing up during testing of some code changes I made to an application.  It took me awhile to figure out precisely what the problem was because the top of the stack trace referred to this:


As looked further down the stack trace, it ultimately pointed out which class was the culprit, so I added an empty public constructor to and redeployed the result.

I found this post rather useful in diagnosing the problem.