Skip to main content

Crystal reports load report failed: Could not load file or assembly CrystalDecisions.Web, Version=10.2.3600.0


Recently we upgraded our Web Application Server to Windows Server 2008. After this, crystal reports in the VS2005 applications failed to load. This is because VS 2005 applications were using crystal report version 10.2.3600.0 which we can't install in Windows Server 2008. In the new server we can only install the crystal report version 10.5.3700.0. I had to follow the below steps to resolve this issue.

  1. Downloaded and installed new version of crystal report from the page below.
    http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=56787567
  2. Changed versions(10.2.3600.0 to 10.5.3700.0) in Web.Config and report viewer pages
  3. We removed all the crystal report reference from the project and tried to refer the new versions. But new versions were not displayed in the list. So I decided to take a local copy of these dlls and refer them. To do this run the below command(as Admin)
    regsvr32 -u C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\shfusion.dll
    The above command will help you to browse assembly folder as normal windows folders.
  4. Now go to C:\Windows\assembly and copy all the required dlls to some local folder and refer them.
  5. Now we were able to build the application successfully at this point, but it didn't work on the development machine. In the development machine, 2 versions of crystal reports still exists and we can't remove completely the 10.2.3600.0 version of crystal report which came as the part of bundled VS 2005.

    But when we put this files in the server where there is only one version of crystal report exists works perfectly.
  6. Then I updated the Crystal Report Version in the below file. It worked in some development machines, but issue still exists with my laptop(Windows 7).
    C:\Windows\Microsoft.NET\Framework\v2.0.50727\RedistList\CrystalReportsList.xml
  7. So I decided to completely remove 10.2.3600.0. To do this, run VS 2005 setup in the maintenance mode and specified to uninstall the crystal report component. Process completed without any error but still dlls exists in the assembly. Then I tried to uninstall through control panel same results. Grrrr..
    I tried to uninstall from assembly by right click and uninstall. This time I got an error message and dlls didn't remove from the assembly. Then I tried GacUtil tool to uninstall it but again failed with an error.
  8. Then I went to registry
    HKEY_LOCAL_MACHINE\Software\Classes\Installer\Assemblies\Global
    Found all the crystal report dll entries here. I deleted all the keys for the version 10.2.3600.0. Data is encrypted and value is REG_MULTI_SZ. Just delete all these keys.
  9. Now tried to uninstall dlls using GacUtil and finally it is worked and application also works perfectly in the development machine too. 

I am sure there will be much easier and correct way to resolve this issue. But unfortunately I couldn't find it when I required. Also there are some steps which you need not to follow, but I just wrote all the attempts that I made.

Note: Step 3: To take a local copy of dlls from assembly, you can use below program

using System;
using System.IO;

class Program
{
    static void Main(string[] args)
    {
        string[] sourceFiles = new string[]
        {
            @"C:\Windows\assembly\GAC_MSIL\CrystalDecisions.CrystalReports.Engine\10.5.3700.0__692fbea5521e1304\CrystalDecisions.CrystalReports.Engine.dll",
            @"C:\Windows\assembly\GAC\CrystalDecisions.Enterprise.Framework\10.5.3700.0__692fbea5521e1304\CrystalDecisions.Enterprise.Framework.dll",
            @"C:\Windows\assembly\GAC\CrystalDecisions.Enterprise.InfoStore\10.5.3700.0__692fbea5521e1304\CrystalDecisions.Enterprise.InfoStore.dll",
            @"C:\Windows\assembly\GAC_MSIL\CrystalDecisions.KeyCode\10.5.3700.0__692fbea5521e1304\CrystalDecisions.KeyCode.dll",
            @"C:\Windows\assembly\GAC_MSIL\CrystalDecisions.ReportAppServer.ClientDoc\10.5.3700.0__692fbea5521e1304\CrystalDecisions.ReportAppServer.ClientDoc.dll",
            @"C:\Windows\assembly\GAC_MSIL\CrystalDecisions.ReportAppServer.CommLayer\10.5.3700.0__692fbea5521e1304\CrystalDecisions.ReportAppServer.CommLayer.dll",
            @"C:\Windows\assembly\GAC_MSIL\CrystalDecisions.ReportAppServer.Controllers\10.5.3700.0__692fbea5521e1304\CrystalDecisions.ReportAppServer.Controllers.dll",
            @"C:\Windows\assembly\GAC_MSIL\CrystalDecisions.ReportAppServer.DataDefModel\10.5.3700.0__692fbea5521e1304\CrystalDecisions.ReportAppServer.DataDefModel.dll",
            @"C:\Windows\assembly\GAC_MSIL\CrystalDecisions.ReportAppServer.DataSetConversion\10.5.3700.0__692fbea5521e1304\CrystalDecisions.ReportAppServer.DataSetConversion.dll",
            @"C:\Windows\assembly\GAC_MSIL\CrystalDecisions.ReportAppServer.ReportDefModel\10.5.3700.0__692fbea5521e1304\CrystalDecisions.ReportAppServer.ReportDefModel.dll",
            @"C:\Windows\assembly\GAC_MSIL\CrystalDecisions.ReportAppServer.XmlSerialize\10.5.3700.0__692fbea5521e1304\CrystalDecisions.ReportAppServer.XmlSerialize.dll",
            @"C:\Windows\assembly\GAC_MSIL\CrystalDecisions.ReportSource\10.5.3700.0__692fbea5521e1304\CrystalDecisions.ReportSource.dll",
            @"C:\Windows\assembly\GAC_MSIL\CrystalDecisions.Shared\10.5.3700.0__692fbea5521e1304\CrystalDecisions.Shared.dll",
            @"C:\Windows\assembly\GAC_MSIL\CrystalDecisions.Web\10.5.3700.0__692fbea5521e1304\CrystalDecisions.Web.dll",
            @"C:\Windows\assembly\GAC_MSIL\CrystalDecisions.Windows.Forms\10.5.3700.0__692fbea5521e1304\CrystalDecisions.Windows.Forms.dll",
        };

        foreach (string file in sourceFiles)
            File.Copy(file, Path.Combine(@"C:\Temp\CrystalReportsAssemblies", Path.GetFileName(file)));
    }
}



After some days, exactly same error reappeared in my machine. Grrrrrrrr...This time by performing below steps I was able to resolve the issue. The problem I faced is while adding reference I point to new dlls of CR but it actually add reference of old 10.2.3600.0 instead of new 10.5.3700.0.
  1. Right click web app project and Click Properties.
  2. Remove reference path



Add reference again, it will add correct versions


Comments

  1. Hello Rohan,

    We have developed a new gen developer friendly BI framework with some extremely unique features. Would like to give you early access & love to hear your opinion. Please do let me know of how to reach out to you. Would be launching product in 1week from now.

    Also could you please share your email details for further communication.

    Regards,
    Anugraha

    ReplyDelete

Post a Comment

Popular posts from this blog

ഗുരു ദേവോ ഭവ:

ഇ ന്ന് ദേശീയ അധ്യാപക ദിനം. അധ്യാപകനും രാഷ്ട്രപതിയുമായിരുന്ന ഡോ.എസ് രാധാകൃഷ്ണന്‍റെ പിറന്നാള്‍ ദിനമാണ് അധ്യാപക ദിനമായി നാം ആചരിക്കുന്നത്. ഈ ഒരു സുദിനത്തില്‍ ഈയൊരു അധ്യാപകനെ സ്മരിച്ചില്ലെങ്കില്‍ അതൊരു നന്ദികേടായി പോവും.  ഓര്‍മ്മക്കുറിപ്പിലേക്ക് കടക്കുന്നതിനു മുന്‍പൊരു ഡിസ്ക്ലെയിമര്‍. ബാദ്ധ്യതാ നിരാകരണം ഒടുക്കം മാത്രം നടത്തുന്നതാണ് ആചാരം. എങ്കിലും, അതു താനല്ലയോ ഇതെന്ന് ചുമ്മാ കല്‍പ്പിച്ചു കൂട്ടി എന്തിനുമേതിനും വ്രണപ്പെടുന്നൊരു സമൂഹത്തില്‍, അവകാശപരിത്യാഗം ആദ്യം തന്നെ നടത്തുകയെന്ന ആചാരലംഘനമാവും ഉചിതം. അതെ, ഇനി ഇവിടെ പറയാന്‍ പോവുന്നതൊരു മിത്ത് മാത്രമാണു. എന്ന്? എവിടെ? എത്രത്തോളം? നടന്നുവെന്നതിനൊന്നും ഇവിടെയൊരു പ്രസക്തിയില്ല. പതിറ്റാണ്ടുകളായി കേരളത്തിലെ പലപല കോളേജുകളും ഇതെന്‍റെ ഗര്‍ഭമാണെന്ന അവകാശവാദവുമായി എത്തിയിട്ടുണ്ടു. സത്യം ആര്‍ക്കറിയാം! ഒരു കാര്യം മാത്രം എനിക്കു തറപ്പിച്ചു പറയാം, എന്‍റെ ഗര്‍ഭം ഇങ്ങിനെയല്ല. അതുകൊണ്ടു തന്നെ ഈ കഥയിലെ കഥാപാത്രങ്ങളും കഥാപരിസരവും സാങ്കല്‍പ്പികം മാത്രമാണു, മറിച്ച് തോന്നുന്നെങ്കില്‍ അതു കയ്യിലിരിപ്പിന്‍റെ ഗുണം

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

I was getting timeout error while executing a stored procedure from the web application. But this stored procedure is executing within a second while running from SQL management studio. This issue can happen when database's statistics and/query plan cache are incorrect. This can be resolved by updating statistics by executing  exec sp_updatestats Error: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. Solution:  exec sp_updatestats If issue didn't resolve even after executing above this, you may need to optimize the query.