tags:

views:

39

answers:

0

Hello All,

I have a weird error on a specific windows XP box when I run my reports.
I'm wondering if anyone else has run into it before.
I show a preview of my reports using a webbrowser control. First I generate a pdf and save it to disk and then I direct the webbrowser control to it's location. See below.

                string pdfName = Guid.NewGuid().ToString() + ".pdf";
                string pdfPath = Path.GetTempPath() + pdfName;
                File.WriteAllBytes(pdfPath,
                    ReportEngine.Reports.DataTableToPDF(currentReportDataTable, selectedReport.ReportName, true));
                webBrowser1.Url = new Uri(pdfPath);

Now on this specific machine when I set the webbrowser url property I get the error:

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Now for a moment I thought that the FileStream hadn't closed after the write but I checked it and it gets closed. Then I thought it might be a permissions issue so I remove the user temp folder and made sure it was accessing the system temp folder and I set the permissions to everyone is able to do anything but still I get the same error.

What else might cause this?

Regards,
-Biff