Error on executing VB file : The assembly does not allow partially trusted callers RRS feed

  • Question

  • Dear All ! Though there are many posts stated with solutions, im still facing the error in my application.

    I have created a VB Class Library project in VS 2008 which on execution in another application (ERP) will open a VB form holding a report.

    Its working fine in Server machine.

    The report is drawn from a DB placed on another server. Everything works fine in Server.

    But in another machine its not. 

    I did opened the project from the local machine, Build it so tht the dll be caught in the ERP application and so it did, iam able to see the dll within the application. but on execution its throwing the error 'The Call to member failed. The assembly does not allow partially trusted callers '

    What should i do in order to execute the project in all local machines application ??


    Thanks in Advance... waiting for a solution..


    Thursday, August 12, 2010 10:20 AM


  • Hi,

    Thanks for your post.

    As the error message said, the caller of your assembly is partially trusted. By default, all code that executes from the local intranet or Internet zones is partially trusted.

    Applications that receive less than full trust by the runtime code access security system are not allowed to call shared managed libraries unless the library writer specifically allows them to through the use of the AllowPartiallyTrustedCallersAttribute Class. Therefore, application writers must be aware that some libraries will not be available to them from a partially trusted context.

    The following 2 references address this issue.

    1. Using Libraries from Partially Trusted Code

    2. Allowing Partially Trusted Callers

    Please mark the right answer at right time.
    • Edited by SamAgain Friday, August 13, 2010 6:47 AM refine
    • Marked as answer by SamAgain Thursday, August 19, 2010 3:44 AM
    Friday, August 13, 2010 6:43 AM