我有一个 SQL Reporting Services 2016 (13.0.5103.6) 标准本机实例,它不允许我使用 Report Builder 15.0.19611.0 编辑报告 (RDL) 或通过报告门户上传它们,它会引发异常并创建内存转储。我仍然可以在实例中执行/生成报告。
在报表生成器中打开报表时,出现以下客户端错误:
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
在服务器 Reporting Services 日志上,相应的错误日志条目是:
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.
假设“svcssrs”是运行 SSRS 实例的 ADUser,对 ReportingServicesService.exe 使用 Procmon(Sysinternals),我确实注意到一个 CreateFile 操作失败,路径未找到,例如C:\Users\svcssrs\AppData\Local\Temp\abcdefgh
C:\Users\svcssrs\AppData\Local\Temp\
存在并且在“svcssrs”用户的完全控制之下。
我正在使用的 RDL 是一个非常标准的 RDL 文件,其中包含 Tablix、一些使用共享数据源的 MSSQL 数据集、一些基本的 SSRS 表达式、嵌入的图像(未链接)并且没有嵌入的 VB 代码或链接的程序集。
我已经从备份中恢复了 SNK 加密密钥,之后我也更改了它,但行为没有改变。
我该如何解决这个问题?