SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Getting this error "Code blocks are not allowed in this file" when accessing

This is a brand new site collection created with Record Template. It uses built in v4 and CSS. There are NO modification to anything but we are getting "code blocks ...." error.

I tried couple of links but they did not solve my issue:

= = = error = = =

Server Error in '/' Application.

Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Code blocks are not allowed in this file.

Source Error:

Line 41: function showHideError() Line 42: {ULSs5K:; Line 43: var docIdEnabled = "<%= Microsoft.Office.DocumentManagement.DocumentId.IsFeatureEnabled(SPContext.Current.Site) %>"; Line 44: var iprEnabled = "<%= Microsoft.Office.RecordsManagement.RecordsRepository.Records.IsInPlaceRecordsEnabled(SPContext.Current.Site) %>"; Line 45: var errSpan = document.getElementById("errFeatureDisabled");

Source File: /companyErecord/rcconsole.aspx Line: 43

Version Information: Microsoft .NET Framework Version:2.0.50727.5448; ASP.NET Version:2.0.50727.5456

= = = end of error = = =

So what to do now?

share|improve this question
up vote 1 down vote accepted

Try to restore the v4.master to an earlier version.

share|improve this answer
Thanks. It worked. So Masterpage must have been broken. Thanks – Bill Baer Jun 13 '12 at 15:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.