I have an SQL Reporting Services 2016 (13.0.5103.6) Standard native instance which won't let me edit Reports (RDLs) with Report Builder 15.0.19611.0 or upload them via the Reports portal, it throws an exception and creates a memory dump. I can still execute/generate reports in the instance.
When opening report in Report Builder I get the client-side error of:
An unexpected error occurred in Report Processing. --->
Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred in Report Processing. --->
System.Exception: For more information about this error navigate to the report server on the local server machine, or enable remote errors
On the server Reporting Services Log, the corresponding error log entry is:
processing!ReportServer_0-1!1ac8!12/23/2021-14:11:29:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: , Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred in Report Processing. ---> System.ComponentModel.Win32Exception: The system cannot find the path specified
at Microsoft.Win32.NativeMethods.CreateDirectory(String path, SafeLocalMemHandle acl)
at System.CodeDom.Compiler.TempFileCollection.CreateTempDirectoryWithAce(String directory, String identity)
at System.CodeDom.Compiler.TempFileCollection.GetTempFileName(String tempDir)
at System.CodeDom.Compiler.TempFileCollection.EnsureTempNameCreated()
at System.CodeDom.Compiler.TempFileCollection.AddExtension(String fileExtension, Boolean keepFile)
at System.CodeDom.Compiler.CodeCompiler.FromDomBatch(CompilerParameters options, CodeCompileUnit[] ea)
at System.CodeDom.Compiler.CodeCompiler.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromDomBatch(CompilerParameters options, CodeCompileUnit[] ea)
at Microsoft.ReportingServices.RdlExpressions.VBExpressionCodeProvider.CompileAssemblyFromDomWithRetry(CompilerParameters options, CodeCompileUnit compilationUnit)
at Microsoft.ReportingServices.RdlExpressions.ExprHostCompiler.InternalCompile(AppDomain compilationTempAppDomain, Boolean refusePermissions)
at Microsoft.ReportingServices.RdlExpressions.ExprHostCompiler.<>c__DisplayClass2.<Compile>b__0()
at Microsoft.ReportingServices.Diagnostics.RevertImpersonationContext.<>c__DisplayClass1.<Run>b__0(Object state)
at System.Security.SecurityContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Security.SecurityContext.Run(SecurityContext securityContext, ContextCallback callback, Object state)
at Microsoft.ReportingServices.Diagnostics.RevertImpersonationContext.Run(ContextBody callback)
at Microsoft.ReportingServices.RdlExpressions.ExprHostCompiler.Compile(IExpressionHostAssemblyHolder expressionHostAssemblyHolder, AppDomain compilationTempAppDomain, Boolean refusePermissions, PublishingVersioning versioning)
at Microsoft.ReportingServices.ReportPublishing.ReportPublishing.Phase3(ParameterInfoCollection& parameters, Dictionary`2& groupingExprCountAtScope)
at Microsoft.ReportingServices.ReportPublishing.ReportPublishing.InternalCreateIntermediateFormat(Stream definitionStream, String& description, String& language, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, DataSetInfoCollection& sharedDataSetReferences, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks, Byte[]& dataSetsHash)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CompileOdpReport(PublishingContext reportPublishingContext, PublishingErrorContext errorContext, String& reportDescription, String& report
library!ReportServer_0-1!1ac8!12/23/2021-14:11:29:: i INFO: Skipped creating a dump file for the error ReportProcessingException, because a dump with the identical stack trace (with signature 2668486527) was already created.
Assuming 'svcssrs' is the ADUser the SSRS instance is running under, using Procmon (Sysinternals) against ReportingServicesService.exe, I did notice a a CreateFile Operation failing with PATH NOT FOUND with paths such as C:\Users\svcssrs\AppData\Local\Temp\abcdefgh
C:\Users\svcssrs\AppData\Local\Temp\
exists and is under the full control of the 'svcssrs' user.
The RDL I'm working with is a very standard RDL file with Tablix, some MSSQL datasets using a shared Datasource, a few basic SSRS expressions, embedded images (not linked) and no embedded VB code or linked assemblies.
I have restored the SNK Encryption Key from a backup and I have also changed it afterwards with no change in behaviour.
How can I resolve this issue?