Saturday, February 11, 2012

#error when referencing System.Data and Microsoft.AnalysisServices.AdomdClient

Hi,

I created a function in the Report Properties -> Code Section that uses System.Data and Microsoft.AnalysisServices.AdomdClient.

In the reference section I have made references to these Assemblies. When I preview my report on the preview tab, everything works fine. But when I deploy it to the server I get #error in the text box which calls the function.

Any ideas?

Thanks in advance.

You may want to carefully read this related thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=460220&SiteID=1

Basically, it is not working in the report server environment due to missing code access security permissions. I believe teh AdomdClient requires FullTrust permissions.

-- Robert

|||

Thanks. The "Expression host assembly" only had execution persmissions. I created a custom assembly and granted it FullTrust.

Thanks again for pointing me in the right direction.

|||

Hi there. When I created my custom assembly, the only way that I was able to get it to work was to use an OLE db connection instead of the Adomdconnection. I had followed these steps here:

http://support.microsoft.com/Default.aspx?kbid=842419

The reason was that I didn't know what type of permission to assert in my code for an Adomdconnection since there wasn't an 'AdomdConnectionPermission' object. Has anyone got this to work with an Adomdconnection object?

My second question is that when my report executes the functions in the assembly, they execute with the credentials of the server identity. Is there a setting in any config file that I can change so that the assembly can impersonate the current user and execute the functions with the user's credentials?

Thanks.

No comments:

Post a Comment