Could not load file or assembly.Access is denied

  • Hi,

    I created a custom assembly named Test.dll in my development server and placed the Test.dll in C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies and C:\Program Files\Microsoft SQL Server\MSSQL.5\Reporting Services\ReportServer\bin.

    And i gave the reference from my report for this dll in C:\Program Files\Microsoft SQL Server\MSSQL.5\Reporting Services\ReportServer\bin.

    After deploying the report it is working fine in development server.

    Then I changed the TatgetServerURL to production server to deploy the report in production server.

    While deploying i'm getting the following error

    ErrorError while loading code module: ‘Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’. Details: Could not load file or assembly Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Access is denied.

    I placed the dll in C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies and C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin of my production server.

    I didn't create strong key for dll.

    Kindly help me to slove this issue.

    -----------------------------------------------------------------------------------------------------------------------------------------------------------
    Please feel free to let me know if you are not clear or I’ve misunderstood anything.

    Thanks,
    Arunkumar S P

  • Please help me experts

    -----------------------------------------------------------------------------------------------------------------------------------------------------------
    Please feel free to let me know if you are not clear or I’ve misunderstood anything.

    Thanks,
    Arunkumar S P

  • Strong name the assembly and GAC it.

  • Thansk for your reply.

    I solved this issue by adding

    Imports System.Security

    Imports System.Security.Permissions

    -----------------------------------------------------------------------------------------------------------------------------------------------------------
    Please feel free to let me know if you are not clear or I’ve misunderstood anything.

    Thanks,
    Arunkumar S P

  • Hi Arunkumar,

    I've tried using the imports you mentioned without any luck with deployment. Could you send a snippet from your test dll showing the security permissions you put on your methods and classes so I can see if that will make a difference?

    Thanks for any help if you happen to have a moment;

    Dave S.

  • Hi davidjsutherland

    Try this

    Imports System.Security

    Imports System.Security.Permissions

    Imports System.Security.PermissionSet

    -----------------------------------------------------------------------------------------------------------------------------------------------------------
    Please feel free to let me know if you are not clear or I’ve misunderstood anything.

    Thanks,
    Arunkumar S P

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply