I have this section in my web.config

    <PageParserPath VirtualPath="/*" CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true" />

what i would like is to restrict the virtual path further to


but when I enter that I get the

Sorry, something went wrong An error occurred during the processing of /SitePages/DataDictionary/default.aspx. Code blocks are not allowed in this file.

message switching back to


works ? how do I format it to only allow coded pages in that one directory?


Adding the ~ is what got things working

    <PageParserPath VirtualPath="~/SitePages/DataDictionary/*" CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true"/>
    <PageParserPath VirtualPath="~/sites/RDS/SitePages/DataDictionary/*" CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true"/>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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