Problems with .NET LocalReport / .rdlc AppDomain

I use Microsoft.Reporting.WebForms.LocalReport and .rdlc Report Files to create .pdf: s. This runs in the background in a Windows service (.NET 4.6, x64, VS2015).

I have two problems:

  • The Windows service continues to consume memory, and as a result, an OutOfMemoryException is thrown and the process terminates.
  • In one case, the entire WindowsSerivce ended with an UnhandledException, although everything is included in the try-catch statement.

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

So, when using LocalReport:

  • Should you always call localReport.ReleaseSandboxAppDomain () after each localReport.Render ()?
  • Do I have to do something to handle any exceptions that may occur in the LocalReport AppDomain sandbox?
+4
source share

Source: https://habr.com/ru/post/1624084/


All Articles