Error: 'An error occurred during the processing of /sitename/Pages/ppssample.aspx. Code Blocks are not allowed in this file.
To resolve this issue, follow the steps below:
- First, we need to edit the web.config file for the application. The default directory is located at: C:\inetpub\wwwroot\wss\VirtualDirectories\80
- Backup the file then open the file and locate the section: <PageParserPaths>
- In the <PageParserPaths> section, add the following lines shown in yellow below, making sure you substitute the 'sitename' for your specific site name, which could be found in your error message. In my example, the site giving me an error is 'bicenter':
<PageParserPaths>
<PageParserPath VirtualPath="/bicenter/*"
CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true"/>
</PageParserPaths>
<PageParserPath VirtualPath="/bicenter/*"
CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true"/>
</PageParserPaths>
- Again, notice I used 'bicenter' as this is the site mentioned in my error screenshot shown above. I also added an asterisk after /bicenter/ to enable code blocks on all sub folders.
- Once I saved the file, I refreshed my 'bicenter' site, no more error and my site opened just fine!
No comments:
Post a Comment