.NET LocalReport / .rdlc AppDomain issues

こ雲淡風輕ζ 提交于 2019-12-12 10:58:06

问题


I'm using Microsoft.Reporting.WebForms.LocalReport and .rdlc Report files to generate .pdf:s. This is done in the background in a Windows Service (.NET 4.6, x64, VS2015).

I'm having two issues:

  1. The Windows service keeps consuming memory an eventually OutOfMemoryException is thrown and process terminates
  2. At one occation the entire WindowsSerivce terminated with UnhandledException despite everything being enclosed in a try-catch statement.

Now, I've read somewhere LocalReport under .NET 4 has changed to live in it's own AppDomain.

So, when using LocalReport:

  • Are you supposed to always call localReport.ReleaseSandboxAppDomain() after each and every localReport.Render()?
  • Do I have to do something to handle any exceptions that may occur in the LocalReport sandbox AppDomain?

来源:https://stackoverflow.com/questions/34763930/net-localreport-rdlc-appdomain-issues

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!