Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

c#

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#.

like image 555
Junever Cezar Quiaoit Avatar asked Dec 06 '22 11:12

Junever Cezar Quiaoit


1 Answers

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

like image 64
Furqan Safdar Avatar answered Dec 10 '22 02:12

Furqan Safdar