Monday, June 14, 2010

Sharepoint- Code blocks are not allowed in this file

Whenever you encounter this error, when having Server Side Script in your custom ASPX Page stored in your Pages Library, you just need to add this line in your site's web.config.

Do not forget to replace the VirtualPath to point to the folder or library which has those pages.


<PageParserPath VirtualPath="/sites/TestSites/page/*" CompilationMode="Always" AllowServerSideScript="true" />

No comments:

Post a Comment