I had this error appearing in event viewer when I tried to run a tool which is doing updates on SharePoint pages.
But this was working very fine in my Dev environment and it is not working on my SharePoint production servers.
Surprised isn’t It …
I tried to figure out the error nothing was successful.
But ones I tried to run the same tool of web front end servers it worked.
My server farm contains 2 application servers and 2 web front end servers. And I figured it out this error is not appearing and working fine in WFEs not App servers.