This error, “Sorry, something went wrong. The aspx_debug attribute on the page directive is not allowed in this page” occurs when trying to create a folder in some types of document libraries, such as the Report Document Library used for SQL Server Reporting Services report documents in SharePoint 2013.
The error comes from some bad /Upload.aspx files that are used by SharePoint 2013.
identifying the upload file for a Report Document Library gives us this standard file path:
C:Program FilesCommon Filesmicrosoft sharedWeb Server Extensions15TEMPLATEFEATURESReportsAndDataListTemplatesReportDocumentLibraryUpload.aspx
The standard contents:
By updating the contents with something that makes more sense we can get the folder creation feature to work again:
Do note that all page directives needs to go, and we need to update the UIVersion property from 15 to 4 otherwise we just get new exciting errors.
Working Folder Creation
By updating the contents of the Upload.aspx (and reload the page) file the following working folder creation dialog will greet you
The following files have this error
- C:Program FilesCommon Filesmicrosoft sharedWeb Server Extensions15TEMPLATEFEATURESReportsAndDataListTemplatesReportDocumentLibraryUpload.aspx
- C:Program FilesCommon Filesmicrosoft sharedWeb Server Extensions15TEMPLATEFEATURESBICenterDataconnectionsLibBIDataConnectionsLibUpload.aspx
- C:Program FilesCommon Filesmicrosoft sharedWeb Server Extensions15TEMPLATEFEATURESPPSDatasourceLibPPSDSLibUpload.aspx
ULS entries
The following and more is found in the ULS log file:
05/16/2013 21:09:49.99 w3wp.exe (0x0DA4) 0x3A00 SharePoint Foundation General 8nca Medium Application error when access /bi/Reports/Forms/Upload.aspx, Error=The aspx_debug attribute on the page directive is not allowed in this page. at Microsoft.SharePoint.ApplicationRuntime.SPPageParserFilter.PreprocessDirective(String directiveName, IDictionary attributes) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) c60e1c9c-d180-8045-addd-b000e44b21b7
05/16/2013 21:09:49.99 w3wp.exe (0x0DA4) 0x3A00 SharePoint Foundation Runtime tkau Unexpected Microsoft.SharePoint.WebPartPages.WebPartPageUserException: The aspx_debug attribute on the page directive is not allowed in this page. at Microsoft.SharePoint.ApplicationRuntime.SPPageParserFilter.PreprocessDirective(String directiveName, IDictionary attributes) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) c60e1c9c-d180-8045-addd-b000e44b21b7
05/16/2013 21:09:50.01 w3wp.exe (0x0DA4) 0x3A00 SharePoint Foundation General ajlz0 High Getting Error Message for Exception System.Web.HttpParseException (0x80004005): The aspx_debug attribute on the page directive is not allowed in this page. —> System.Web.HttpParseException (0x80004005): The aspx_debug attribute on the page directive is not allowed in this page. —> Microsoft.SharePoint.WebPartPages.WebPartPageUserException: The aspx_debug attribute on the page directive is not allowed in this page. at Microsoft.SharePoint.ApplicationRuntime.SPPageParserFilter.PreprocessDirective(String directiveName, IDictionary attributes) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding) at System.Web.UI.TemplateParser.ProcessException(Exception ex) at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncod… c60e1c9c-d180-8045-addd-b000e44b21b7
05/16/2013 21:09:50.01* w3wp.exe (0x0DA4) 0x3A00 SharePoint Foundation General ajlz0 High …ing) at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding) at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath) at System.Web.UI.TemplateParser.Parse() at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilatio… c60e1c9c-d180-8045-addd-b000e44b21b7
05/16/2013 21:09:50.01* w3wp.exe (0x0DA4) 0x3A00 SharePoint Foundation General ajlz0 High …n.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) at System.Web.UI.PageHandlerFac… c60e1c9c-d180-8045-addd-b000e44b21b7
05/16/2013 21:09:50.01* w3wp.exe (0x0DA4) 0x3A00 SharePoint Foundation General ajlz0 High …tory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) c60e1c9c-d180-8045-addd-b000e44b21b7
05/16/2013 21:09:50.01 w3wp.exe (0x0DA4) 0x3A00 SharePoint Foundation General aat87 Monitorable c60e1c9c-d180-8045-addd-b000e44b21b7
More information
This problem was found in a SharePoint 2013 Farm with the April 2013 CU installed using SQL Server 2012 Enterprise Edition SP1 CU3 and Reporting Services installed in integrated mode.
Additional error messages
If some page directives are still in the file some of the following error messages will be visible
The aspx_trace attribute on the page directive is not allowed in this page
The aspx_viewstate attribute on the page directive is not allowed in this page
The inherits_webpartpage attribute on the page directive is not allowed in this page
The aspx_page_extras attribute on the page directive is not allowed in this page
Sorry, something went wrong. UIVersion property is invalid
Hi Stefan,
You wrote:
“The error comes from some bad /Upload.aspx files that are used by SharePoint 2013.”
So has Microsoft issued a fix for this? I just ran into the problem today 🙁
Paul
Hi Paul,
I’m not sure if this has been fixed in any of the updates released after I wrote the post. Fixing this manually is fairly easy if you have access to the actual files on the servers in the Farm. It is a fairly obvious issue so I would have thought it fixed by now, but then Microsoft’s track record for releasing working CU’s for SharePoint is not the best, even the last one was recalled… What SP/CU are you on?
Stefan
The exception stack from ULS after enabling verbose ex is not suggestive of the root cause for this which should be attacked.
I checked on discrepancies on the upload .aspx file mentioned above with an environment it’s working fine in ,both are identical . Also both the environments are running the same CU and SP for SP 2013 .