使用 CacheToDisk 时 PDF*.tmp 文件未被删除并出现内存不足异常
我们在项目中使用ActiveReports,在代码中我们使用CacheToDisk属性来避免内存异常。我们使用WCF服务,它将调用dll中包含ActiveReport报表生成的方法。 WCF 服务托管在 Windows 服务中。
将报告导出为 PDF 时,会在isolatedStorage 文件夹中创建 PDF*.tmp 文件,并且不会自动删除。我们使用 Document 对象的 Dispose() 方法,AR*.tmp 文件被删除,但 PDF*.tmp 文件(每个文件约 100 MB)不会被删除。我们对IsolatedStorage文件夹进行了硬编码,并授予运行Windows服务的用户完全权限。
请告诉我们如何自动删除IsolatedStorage文件夹中的PDF*.tmp文件?有时,即使使用 CacheToDisk(导出到 Excel 或 pdf),某些报告也会出现内存不足的异常,有时 Windows 服务本身会由于内存异常而自动停止。
We are using ActiveReports in our project, in the code we are using CacheToDisk property to avoid memory exception. We used WCF service, which will call a method in dll which contains the ActiveReport Report generation. The WCF service is hosted in Windows Service.
When reports are exported to PDF, in IsolatedStorage folder the PDF*.tmp files are created and it is not deleted automatically. We used Dispose() method of the Document object, the AR*.tmp files are removed but PDF*.tmp files (each file around 100 MB) are not removed. We hard coded the IsolatedStorage folder and gave full permission to the user, under which Windows Service is running.
Please let us know how to delete the PDF*.tmp files automatically in IsolatedStorage folder ? Also some times we get out of memory exception for some reports even after using CacheToDisk (exporting to excel or pdf) and some times the Windows Service itself stopped automatically due to memory exception.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Varun
我们一直致力于通过您在此处的帖子解决您的问题:http://www .datadynamics.com/forums/145096/ShowPost.aspx
请关注本论坛的帖子,看看相关问题是否得到解决。
一旦我们有了最终解决方案,我将更新这篇文章。
谢谢拉吉
Varun
We have been working on getting your issue resolved through your post here at: http://www.datadynamics.com/forums/145096/ShowPost.aspx
Please follow up on the post on this forum to see if the related issue is resolved or not.
I will update this post once we have a final resolution.
Thanks
raji