Put your (medium) trust in XtraReports, the premier ASP.NET reporting tool

ctodx
16 April 2009

Not a lot of people know this, it seems (it came up again in a pre-sales phone call), but XtraReports can create reports for ASP.NET that will work on web hosts that require medium trust rather than having to force the hosting service to grant full trust.

I'll let that sink in for a while.

Yes, indeed, those reports you've created in the past that could only run in full trust (with all the attendant security issues) can all be converted to XtraReports and run on a medium trust server. I thought it was an important enough topic to blog about it here so that everyone knows.

However, there are a few limitations to running reports in medium trust, even from those awfully nice people at DevExpress. We are working on reducing these as much as we can. First of all, here's the definitive article from MSDN that explains all about medium trust in ASP.NET 2.0. The current limitations are:

  • Running end-user scripts, or loading a report from a REPX file or a stylesheet from a REPSS field is not allowed under medium trust, since they all involve compiling code in some sense and that's not allowed.
  • Creating 3D Charts is also not allowed since we use the OpenGL rendering library, another no-no.
  • Exporting to a metafile or rendering an XRChart control as a metafile (its XRChart.ImageType property must be set to ChartImageType.Bitmap)
  • Exporting to a PDF when you have to embed fonts. Only characters from 32 to 255 are allowed in medium trust.
  • XRRichText and XRPivotGrid controls aren't supported.

As you can see, providing you avoid some high-end features, XtraReports will suit your medium trust environment down to the ground. Give your hosting company a break and use XtraReports for your web application's reporting needs.

4 comment(s)
Brien King
Brien King

LoadLayoutFromStream and SaveLayoutToStream also require FULL trust to work.

17 April, 2009
Alan (DevExpress)
Alan (DevExpress)

Yes, Brien, you're right, and this is covered by this phrase: "loading a report from a REPX file". Anyway, thanks for your note. We'll update our documentation, so that it states that loading a report definition from the REPX format (either a file or a stream) requires the Full Trust permission level.

As for using the SaveLayoutToStream method, as far as I know, it should work under Medium Trust level just fine. Do you experience any problems with it?

17 April, 2009
Martijn van IJperen
Martijn van IJperen

We need a document viewer that can show Word, Excel, Tiff images in our asp.net web application can this be done or are there any plans for it?

19 April, 2009
kanth 456
kanth 456

dear Bucknall,

          hi am srikanth i had afew problems while generating Xtra reports in web environment. the problems are

1) i am not able to bind the data to report in pageload.but it is getting in  buttonclick.

2) after bind data in buttonclick report toolbar buttons are not working. i mean to say that export buttons are not working.

please reply me as soon as posible

25 April, 2009

Please login or register to post comments.