Domanda

I have this section in my web.config

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

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

VirtualPath="/SitePages/DataDictionary/*" 

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

VirtualPath="/*" 

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

È stato utile?

Soluzione

Adding the ~ is what got things working

  <PageParserPaths>
    <PageParserPath VirtualPath="~/SitePages/DataDictionary/*" CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true"/>
    <PageParserPath VirtualPath="~/sites/RDS/SitePages/DataDictionary/*" CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true"/>
  </PageParserPaths>
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top