Monday, June 13, 2011

VS 2010 Report runs locally, but not on server

Last week, I attempted to work with the VS 2010 reporting component. It took a bit of time to figure out setting up a data source...getting a decent layout, etc. All I really needed was a basic report that allowed the user the option of exporting the data to Excel. The VS built-in tool did everything I needed.

Once I got it running on my local server, I moved it up to the production server that was provided by a third party vendor. However, once I moved out there, I received the error: 'Local report processing requires FullTrust Code Access Security permissions, which is unavailable to the calling code. Grant the application FullTrust permissions or use ServerReport to execute the report remotely.'

After modifying various reporting options inside the reporting component and then in the code-behind, nothing seemed to work. Until I found a post that mentioned the web.config settings. And that resolved it. Make sure you have moved all of the related reporting web.config items (I did not have everything initially...) then try adding the following tag in the <system.web> section:

<trust level="Full" />

This change did it for me. Hope that helps!

4 comments: