Could not load file or assembly

Posted by: hbkelkar on 5 October 2017, 1:52 am EST

    • Post Options:
    • Link

    Posted 5 October 2017, 1:52 am EST

    Hello,

    I am doing a first hand trial with active reports web reports. My development machine is running on Windows 7 and application (asp.net ) done using Visual Studio 12 with Active Reports 11 Professional.

    Application with Report working fine in development machine. When i have uploaded to my hosting server (Godaddy-windows hosting) my application is giving an error

    “Could not load file or assembly ‘GrapeCity.ActiveReports.Export.Document.v11, Version=11.0.8705.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff’ or one of its dependencies. The system cannot find the file specified”

    Error is for All the files, listed in my web.config files.

    These are my web.config lines…

    <system.data>
        <DbProviderFactories>
          <remove invariant="MySql.Data.MySqlClient" />
          <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data" />
          <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
        </DbProviderFactories>
      </system.data>
      <system.web>
        <!-- Made changes on 03-10-2017 : trust level security exception-->
        <customErrors mode="Off" />
        <trust level="Full" />
        <compilation debug="true" strict="false" explicit="true" targetFramework="4.0">
          <assemblies>
            <add assembly="GrapeCity.ActiveReports.Web.v11, Version=11.0.8705.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
            <add assembly="GrapeCity.ActiveReports.Export.Xaml.v11, Version=11.0.8705.0, Culture=neutral, PublicKeyToken=CC4967777C49A3FF" />
            <add assembly="GrapeCity.ActiveReports.Export.Document.v11, Version=11.0.8705.0, Culture=neutral, PublicKeyToken=CC4967777C49A3FF" />
            <add assembly="GrapeCity.ActiveReports.Export.Pdf.v11, Version=11.0.8705.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
            <add assembly="GrapeCity.ActiveReports.Export.Html.v11, Version=11.0.8705.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
            <add assembly="GrapeCity.ActiveReports.Export.Image.v11, Version=11.0.8705.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
            <add assembly="GrapeCity.ActiveReports.Export.Rdf.v11, Version=11.0.8705.0, Culture=neutral, PublicKeyToken=CC4967777C49A3FF" />
            <add assembly="GrapeCity.ActiveReports.v11, Version=11.0.8705.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
            <add assembly="GrapeCity.ActiveReports.Diagnostics.v11, Version=11.0.8705.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
            <add assembly="GrapeCity.ActiveReports.Document.v11, Version=11.0.8705.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
            <add assembly="GrapeCity.ActiveReports.Extensibility.v11, Version=11.0.8705.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
            <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
            <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
            <add assembly="GrapeCity.ActiveReports.Chart.v11, Version=11.0.8705.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
            <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
          </assemblies>
        </compilation>
        <authentication mode="None">
          <forms loginUrl="~/Account/Login" timeout="2880" defaultUrl="~/" />
        </authentication>
        <profile defaultProvider="DefaultProfileProvider">
          <providers>
            <add name="DefaultProfileProvider" type="System.Web.Providers.DefaultProfileProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/" />
          </providers>
        </profile>
        <membership defaultProvider="DefaultMembershipProvider">
          <providers>
            <add name="DefaultMembershipProvider" type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />
          </providers>
        </membership>
        <roleManager defaultProvider="DefaultRoleProvider">
          <providers>
            <add name="DefaultRoleProvider" type="System.Web.Providers.DefaultRoleProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/" />
          </providers>
        </roleManager>
        <!--
                If you are deploying to a cloud environment that has multiple web server instances,
                you should change session state mode from "InProc" to "Custom". In addition,
                change the connection string named "DefaultConnection" to connect to an instance
                of SQL Server (including SQL Azure and SQL  Compact) instead of to SQL Server Express.
          -->
        <sessionState mode="InProc" customProvider="DefaultSessionProvider">
          <providers>
            <add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" />
          </providers>
        </sessionState>
        <pages controlRenderingCompatibilityVersion="4.0" />
        <httpHandlers>
          <add verb="*" path="*.asmx" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
          <add verb="*" path="*.ar11" type="GrapeCity.ActiveReports.Web.Handlers.ReportBinariesStreamer, GrapeCity.ActiveReports.Web.v11, Version=11.0.8705.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
          <add verb="*" path="*.ActiveReport" type="GrapeCity.ActiveReports.Web.Handlers.CompiledReportHandler, GrapeCity.ActiveReports.Web.v11, Version=11.0.8705.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
          <add verb="*" path="*.rpx" type="GrapeCity.ActiveReports.Web.Handlers.RpxHandler, GrapeCity.ActiveReports.Web.v11, Version=11.0.8705.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
          <add verb="*" path="*.rdl,*.rdlx" type="GrapeCity.ActiveReports.Web.Handlers.RdlxHandler, GrapeCity.ActiveReports.Web.v11, Version=11.0.8705.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
          <add verb="*" path="*.ar11Web" type="GrapeCity.ActiveReports.Web.Handlers.WebCacheAccessHandler, GrapeCity.ActiveReports.Web.v11, Version=11.0.8705.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" />
        </httpHandlers>
      </system.web>
      <system.webServer>
        <modules runAllManagedModulesForAllRequests="true" />
        <validation validateIntegratedModeConfiguration="false" />
        <handlers>
          <add verb="*" path="*.asmx" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" name="AsmxHandler" resourceType="Unspecified" preCondition="integratedMode" />
          <add verb="*" path="*.ar11" type="GrapeCity.ActiveReports.Web.Handlers.ReportBinariesStreamer, GrapeCity.ActiveReports.Web.v11, Version=11.0.8705.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" name="AR11_ReportBinariesStreamer" resourceType="Unspecified" preCondition="integratedMode" />
          <add verb="*" path="*.ActiveReport" type="GrapeCity.ActiveReports.Web.Handlers.CompiledReportHandler, GrapeCity.ActiveReports.Web.v11, Version=11.0.8705.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" name="AR11_CompiledReportHandler" resourceType="Unspecified" preCondition="integratedMode" />
          <add verb="*" path="*.rpx" type="GrapeCity.ActiveReports.Web.Handlers.RpxHandler, GrapeCity.ActiveReports.Web.v11, Version=11.0.8705.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" name="AR11_RpxHandler" resourceType="Unspecified" preCondition="integratedMode" />
          <add verb="*" path="*.rdl,*.rdlx" type="GrapeCity.ActiveReports.Web.Handlers.RdlxHandler, GrapeCity.ActiveReports.Web.v11, Version=11.0.8705.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" name="AR11_RdlxHandler" resourceType="Unspecified" preCondition="integratedMode" />
          <add verb="*" path="*.ar11Web" type="GrapeCity.ActiveReports.Web.Handlers.WebCacheAccessHandler, GrapeCity.ActiveReports.Web.v11, Version=11.0.8705.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff" name="AR11_WebCacheAccessHandler" resourceType="Unspecified" preCondition="integratedMode" />
        </handlers>
      </system.webServer>
      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="DotNetOpenAuth.Core" publicKeyToken="2780ccd10d57b246" />
            <bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.1.0.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="DotNetOpenAuth.AspNet" publicKeyToken="2780ccd10d57b246" />
            <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
    

    How can this is resolved

    thanks

    Hemanth Kelkar

  • Posted 5 October 2017, 3:22 am EST

    Hi Hemanth,

    Please make sure that you have included the required ActiveReports Dll with you report project. Also you need to check if the version of ActiveReports dll in the project is as same as shown in the Licenses.licx and web.config file.

    Thanks,

    Deepak Sharma

  • Posted 5 October 2017, 6:38 am EST

    Hello Mr Sharma

    Thanks for the reply. Yes, i checked the solution again., In fact, I have just included the Active reports and the references got added.

    Rebuilt and getting same error…

    Attached the Screenshot of my references and web.config assemblies list.

    <commented line is for testing, i had done to verify version mismatch>

    Also, i have made the property ‘Copy local’ to True.

    Any clue here ?

    thanks again

    Hemanth Kelkar

  • Posted 5 October 2017, 6:54 am EST

    Hello, Deepak,

    Yes, There was a mismatch between my assemblies list from web.config and my references , which as the cause for my error.

    I have included the missing files and now its working fine .

    Thanks for the Input

    Thanks

    Hemanth

  • Posted 5 October 2017, 10:09 am EST

    Glad to know that your issue is resolved.

    Thanks,

    Deepak Sharma

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels