An exception thrown by the edit tree in EPiServer edit mode when running .Net 4.0.
This described in the article
EPiServer CMS 6.0 now supporting ASP.NET 4.0.
To fix this I added controlRenderingCompatibilityVersion="3.5" and clientIDMode=”AutoID” to the pages tag in web.config.
Example
Changes in web.config
<configuration>
...
<system.web>
<pages
controlRenderingCompatibilityVersion="3.5"
clientIDMode="AutoID"