我有一个MVC web应用程序运行在Azure。我们使用Microsoft.Reporting.WebForms.LocalReport实例来针对web应用程序使用的数据库运行报表。有些数据集非常大,呈现可能需要很长时间。因此,我们决定将报表的呈现作为Web作业卸载到一个单独的App中。应用程序在我的开发环境中正确运行,但当它作为web作业上载时,它会崩溃,web作业日志中有以下异常:
[10/30/2017 17:16:48 > 81a023: ERR ] Unhandled Exception: Microsoft.Reporting.WinForms.LocalProcessingException: An error occurred during local report processing. ---> Microsoft.Reporting.DefinitionInvalidException: The definition of the report '' is invalid. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: An unexpected error occurred in Report Processing. ---> System.TypeInitializationException: The type initializer for 'Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.IntermediateFormatVersion' threw an exception. ---> System.ArgumentException: The path is not of a legal form.
[10/30/2017 17:16:48 > 81a023: ERR ] at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
[10/30/2017 17:16:48 > 81a023: ERR ] at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
[10/30/2017 17:16:48 > 81a023: ERR ] at System.IO.Path.GetFullPathInternal(String path)
[10/30/2017 17:16:48 > 81a023: ERR ] at System.IO.Path.GetFullPath(String path)
[10/30/2017 17:16:48 > 81a023: ERR ] at System.Diagnostics.FileVersionInfo.GetFullPathWithAssert(String fileName)
[10/30/2017 17:16:48 > 81a023: ERR ] at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName)
[10/30/2017 17:16:48 > 81a023: ERR ] at Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.IntermediateFormatVersion.<>c__DisplayClass1.<.cctor>b__0()
[10/30/2017 17:16:48 > 81a023: ERR ] at Microsoft.ReportingServices.Diagnostics.RevertImpersonationContext.<>c__DisplayClass1.<Run>b__0(Object state)
[10/30/2017 17:16:48 > 81a023: ERR ] at System.Security.SecurityContext.Run(SecurityContext securityContext, ContextCallback callback, Object state)
[10/30/2017 17:16:48 > 81a023: ERR ] at Microsoft.ReportingServices.Diagnostics.RevertImpersonationContext.Run(ContextBody callback)
[10/30/2017 17:16:48 > 81a023: ERR ] at Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.IntermediateFormatVersion..cctor()调用LocalReport.Render()方法时会引发错误。
报表定义是从数据库中的表中读取的,因此如果需要对报表进行更改,则不需要重新编译或重新发布任何内容。
我的问题是,为什么会发生这种情况,我该如何解决?
提前谢谢。
发布于 2017-11-01 08:46:48
https://stackoverflow.com/questions/47023126
复制相似问题