【发布时间】:2013-03-25 14:20:44
【问题描述】:
我在 SQL Server 2012 SP1 Reporting Services 实例中设置了订阅,该实例将 34MB 文件导出到 Excel 2007-2013 XLSX OpenXML 呈现扩展插件。订阅抛出如下错误:
System.IO.IsolatedStorage.IsolatedStorageException:无法确定域的身份。
我确认可以毫无问题地将报告从报告管理器导出到 Excel 2007-2013 XLSX OpenXML 渲染扩展。此错误仅在通过订阅执行报告时发生。我对此进行了研究,并在网上找到了以下建议:
建议错开订阅,以便一次只运行一个。这无济于事,因为在发生错误时只有一个订阅正在运行。
建议使用 Excel 2003 呈现方法并将行分成单独的选项卡以避免 65,536 行限制。我确实验证了此方法可行,但从业务利益相关者的角度来看,这不是一个可接受的解决方案。
一条注释指示使用 Excel 2007-2013 呈现方法且大小超过 10 MB 的任何报告从在内存中生成切换到使用独立存储。没有解释为什么这是不好的,我认为这样做是有充分理由的——也许是为了限制 RAM 消耗。
为 ASP.NET 应用程序的独立存储文件夹中的用户提升权限的建议。我找不到 Reporting Services 的独立存储文件夹所在的位置。
建议使用绕过此问题的额外代码包装 ASP.NET 的独立存储代码。我找不到将此解决方案应用到 Reporting Services 的方法,因为这是 Microsoft 提供的产品。
建议修改报表管理器和报表服务器 web.config 文件以在 httpRuntime 节点中包含 maxRequestLength="200000"。这并没有改变结果。
在 RSReportServer.config 中明确增加内存设置的建议。这似乎没有帮助,因为该错误与独立存储有关,但我出于绝望尝试了它。这并没有改变结果。
建议将 DatabaseQueryTimeout 值从 120 更改为更大的值。这并没有改变结果。
更改订阅执行超时值的建议。这并没有改变结果。
以下是完整错误日志条目的副本:
reportrendering!WindowsService_5!1628!04/03/2013-09:48:33:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.UnhandledReportRenderingException: , Microsoft.ReportingServices.ReportProcessing.UnhandledReportRenderingException: An error occurred during rendering of the report. ---> Microsoft.ReportingServices.OnDemandReportRendering.ReportRenderingException: An error occurred during rendering of the report. ---> System.IO.IsolatedStorage.IsolatedStorageException: Unable to determine the identity of domain.
at System.IO.IsolatedStorage.IsolatedStorage._GetAccountingInfo(Evidence evidence, Type evidenceType, IsolatedStorageScope fAssmDomApp, Object& oNormalized)
at System.IO.IsolatedStorage.IsolatedStorage.GetAccountingInfo(Evidence evidence, Type evidenceType, IsolatedStorageScope fAssmDomApp, String& typeName, String& instanceName)
at System.IO.IsolatedStorage.IsolatedStorage._InitStore(IsolatedStorageScope scope, Evidence domainEv, Type domainEvidenceType, Evidence assemEv, Type assemblyEvidenceType, Evidence appEv, Type appEvidenceType)
at System.IO.IsolatedStorage.IsolatedStorage.InitStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType)
at System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType)
at MS.Internal.IO.Packaging.PackagingUtilities.ReliableIsolatedStorageFileFolder..ctor()
at MS.Internal.IO.Packaging.PackagingUtilities.GetDefaultIsolatedStorageFile()
at MS.Internal.IO.Packaging.PackagingUtilities.CreateUserScopedIsolatedStorageFileStreamWithRandomName(Int32 retryCount, String& fileName)
at MS.Internal.IO.Packaging.SparseMemoryStream.EnsureIsolatedStoreStream()
at MS.Internal.IO.Packaging.SparseMemoryStream.SwitchModeIfNecessary()
at MS.Internal.IO.Zip.ZipIOFileItemStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.Compression.DeflateStream.InternalWrite(Byte[] array, Int32 offset, Int32 count, Boolean isAsync)
at System.IO.Compression.DeflateStream.Write(Byte[] array, Int32 offset, Int32 count)
at MS.Internal.IO.Packaging.CompressStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Zip.ProgressiveCrcCalculatingStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Zip.ZipIOModeEnforcingStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at Microsoft.ReportingServices.Rendering.ExcelOpenXmlRenderer.XMLModel.XMLStreamsheetModel.WriteStreamToStream(Stream from, Stream to)
at Microsoft.ReportingServices.Rendering.ExcelOpenXmlRenderer.XMLModel.XMLStreamsheetModel.Cleanup()
at Microsoft.ReportingServices.Rendering.ExcelOpenXmlRenderer.OpenXmlGenerator.FinalizeWorksheet()
at Microsoft.ReportingServices.Rendering.ExcelOpenXmlRenderer.OpenXmlGenerator.NextWorksheet()
at Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection
【问题讨论】:
-
不幸的是,您似乎在报告服务 Excel 渲染器中发现了一个错误或限制(尽管如果您可以通过报告管理器生成报告,那么对我来说这听起来像是一个错误)。 34 MB 是一个相当大的电子表格报告。这实际上是一份报告还是数据提取?可以导出为 CSV 而不是 Excel 格式吗?您可以改用 SSIS 将数据导出到电子表格吗?
-
我更新了 Connect 错误以包含来自此问题的信息。我通过 SSIS 包脚本任务中的 ReportServer URL 渲染报告来解决这个错误。
标签: sql-server reporting-services sql-server-2012 reportserver