Error while unloading AppDomain. (Exception from HRESULT: 0x80131015)

4

I am having this error after using ReportViewer. Upon exit it has this error. Don't know what is causing this. I am using C#.

c#
asked on Stack Overflow Sep 29, 2012 by Junever Cezar Quiaoit • edited Apr 3, 2013 by cryptic ツ

1 Answer

15

This is a reported Microsoft bug. There is a workaround for it - to call reportViewer.LocalReport.ReleaseSandboxAppDomain() method before closing the parent form.

Example:

private void frmMyForm_FormClosing(object sender, FormClosingEventArgs e)
{
    reportViewer1.LocalReport.ReleaseSandboxAppDomain();
}

Reference: Weird behaviour when I open a reportviewer in WPF

answered on Stack Overflow Sep 29, 2012 by Furqan Safdar • edited May 23, 2017 by Community

User contributions licensed under CC BY-SA 3.0