Monday, July 9, 2012

Code Blocks Not Allowed in SharePoint 2010

Recently been doing some quick prototyping some web-parts, regular aspx, and master pages in sharepoint and just been using inline code blocks. then i got an error message as follows
 
"An error occurred during the processing of /_Path. Code blocks are not allowed in this file."
 
In order to work around this I had to edit the web.config  as follows.
 
<SharePoint>
  <SafeMode MaxControls="200" CallStack="false" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false">
   <PageParserPaths>
 
  <PageParserPath VirtualPath="~/pages/*" CompilationMode="Always" AllowServerSideScript="true" />
    </PageParserPaths>
  </SafeMode>
 
 
 

No comments:

Post a Comment

SAP HANA Cloud Integration SAP : Part -01

What Is SAP HANA Cloud Integration? CPI-DS is a cloud-based data integration tool for batch & scheduled data integration between on-pr...