Thursday, March 6, 2014

An error occurred during the processing of . The event handler 'onclick' is not allowed in this page.


Pulling from my old notes:

Came accross this issue while  trying to run custom page deployed to share point  2007 site

"An error occurred during the processing of . The event handler 'onclick' is not allowed in this page."

When I check web.config file I notice   <PageParserPaths>.. </PageParserPaths> block was empty

<SharePoint>
    <SafeMode MaxControls="200" CallStack="false" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false">
      <PageParserPaths>
<PageParserPath VirtualPath="/*" CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true" />
      </PageParserPaths>

Addition of highlighted line resolved the issue.

Original post I refereed is HERE 

No comments:

Post a Comment