Problem
I was working on a solution where I needed to change the renderings on the standard values. But when I clicked on the presentation details I got an InvalidOperationException exception, and the dialog showed the classic “Server Error in ‘/’ Application” page (see the image above).
Solution
I assume that the layouts field was corrupted. So I got the raw field value for the renderings field (using dbbrowser.aspx) and started to check if all the ID’s existed in the master database. I found that a number of ID’s did not exist so I removed those elements and then saved the raw value back in the field, and all was good again.