While working with Kentico CMS I have came across this annoying error.
Unable to cast object of type 'ASP.cmstemplatelayouts_blankmasterpage_ascx' to type 'CMS.PortalControls.CMSAbstractLayout
This is due the fact that the website is currently precompiling or related with a pre-compilation error with the website.
I normally fix this error my restart IIS or the app pool for the website.