Tuesday, October 6, 2020

AX 2012 EP - 'The referenced file '/_layouts/ep/EPSecurityControlascx' is not allowed on this page'

 This morning I woke up to the following error in Enterprise Portal:

We tried 'IISRESTART' and full restarts of our EP and AX servers.

I then looked at the web.config file and found that it had been modified last night. I also found the some Sharepoint security updates had come through as well.  I knew the web.config was the issue but had no way of knowing what it was.

After posting on the AX forum, a great user gave me the solution.

https://community.dynamics.com/ax/f/microsoft-dynamics-ax-forum/404119/ep-the-referenced-file-is-not-allowed-on-this-page/1098599#1098599

In the <SafeMode><PageParserPaths> HERE </PageParserPaths></SafeMode> you need to put:

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

Once I put that in there, it worked perfectly!  No need to uninstall the updates.