Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6318365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T15:37:50+00:00 2026-05-24T15:37:50+00:00

While using external assembly, getting this message in SSRS Report in preview pane. Failed

  • 0

While using external assembly, getting this message in SSRS Report in preview pane.

Failed to load expression host assembly. Details: That assembly does not allow partially trusted callers.

i’ve spent a day with this problem (initially started as #Error)

initially calling external assembly was fine. i would get the #Error whenever that external assembly was calling a web service. So i followed these directions, and added the code to add permission for calling a service with:

var urlRegEx = new Regex(@"http://mydevserver\.com/.*");
var p = new WebPermission(NetworkAccess.Connect,urlRegEx);
p.Assert();

the p.Assert throws a security exception. so, the last step i did was to attempt to add full trust to the assembly that executes above code with:

cespol -af myAssembly.dll //after strongly signing it

that appeared to add full trust to it. but, now i am getting the above message.

not sure what the report is referring to as “Expression host assembly” and/or which assembly exactly is at fault here. I also followed directions in above link to add CodeGroups (url) for 2 assemblies referenced by my report, and added FullTrust to those as well using Microsoft Framework Configuration tool.

One important thing to consider is, initially i could at least execute some simple code in my referenced assembly, (only calling a webservice would cause #Error). But now, after adding that fulltrust, i can’t do that anymore, and keep getting above error.

if i remove full trust from referenced assembly (using castol utility), and try to call calling p.Assert() in it, i get the following error:

SecurityException: Request for the permission of type SecurityPermission failed.

UPDATE

signing the assembly, is what is causing the main error in this post (Failed to load expression host assembly)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T15:37:50+00:00Added an answer on May 24, 2026 at 3:37 pm

    one way to get around this error

    there is an attribute to allow partially trusted callers.

    [assembly:AllowPartiallyTrustedCallers]
    

    This still doesn’t solve my bigger problem, but the error in this thread goes away.. need to do some more research. still not sure which “caller” is the partially trusted one, since my external assembly has full trust.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've seen this quite a few times while using Office Interop classes this.CustomXMLParts.Add(MyResources.Data, new
In my .xsl file I am using external graphics like this <fo:external-graphic width=90pt height=29pt
I'm using the external storage for storing events in a database while they are
While using Struts2, I am using several annotations to do my validations inside the
While using Vim (at home and at work), I often find myself doing similar
I am experiencing a crash while using the Boost.Spirit and Boost.Thread libraries in my
I would like to create a custom XmlDeclaration while using the XmlDocument/XmlDeclaration classes in
Any idea where the setting is hiding for turning gridlines off while using excel
While generating charts using RS 2008 betas, RC0 and such., I never specified any
For a while we were using a tool called CodeVeil. I'm just wondering if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.