http://www.sharepointassist.com/2011/10/20/sharepoint-error-code-blocks-are-not-allowed-in-this-file/
- The root cause of the error is simple – a user replaced a view file from the /forms/ folder of the document library, typically “AllItems.aspx"
- Open site that contains the library
- Click on “Site Actions” >> “Site Settings” to view the site settings page “_layouts/settings.aspx”
- Click on the library that displays the error to view the library’s settings page
- Add a new view to the library and check the box “default view
http://www.sharepointassist.com/2011/10/20/sharepoint-error-code-blocks-are-not-allowed-in-this-file/
http://blogs.msdn.com/b/kaevans/archive/2007/04/26/code-blocks-are-not-allowed-in-this-file-using-server-side-code-with-sharepoint.aspx