Intermittent System.IO.FileLoadException from 32-bit VB.NET on 2012R2

Hello Support,

We’re experiencing intermittent problems while trying to start a VB.NET application on a Windows 2012R2 server. Most of the time it works correctly, loading the license file without exception, but occasionally it’s blowing up with the following error:

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly ‘Aspose.Cells, Version=17.3.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’ or one of its dependencies. Provider DLL failed to initialize correctly. (Exception from HRESULT: 0x8009001D)
at [OurApplication].AppCore.Main()

There is nothing variable on the server at the time of the error, it just happened to fall on its face some small portion of the time. Is this a known issue? Is there an update we should look to apply?

Let me know if there is some way for me to gather diagnostic data to assist. Our project is too large and proprietary to share, but we’re simply just loading the license file at startup using what I suspect is sample code from your documentation:

    Dim lic As Aspose.Cells.License = New Aspose.Cells.License()
    lic.SetLicense("Aspose.Cells.Product.Family.lic") 

Thank you,
Ryan

@RDel

For such kind of issue, most possible reason is that the Aspose.Cells.dll has been changed to some other version than the required one when starting the application. You need to check the path used by your application to make sure there is only one correct Aspose.Cells.dll and it can never be changed dynamically.

Thank you for your reply.

I just performed an exhaustive search, and there is exactly one copy of Aspose.Cells.dll on the entire file system. I do see, however, that there is a newer version available. Unless you think it could be something different, I’ll update the DLL (and corresponding xml file, if that matters), being certain to first remove the old, and try that on the server.

@RDel

Thanks for using Aspose APIs.

Please following these three steps.

  1. Remove the existing reference of Aspose.Cells dll from your project.
  2. Add the reference of Aspose.Cells again.
  3. Rebuild the Solution

Here are the screenshots for your reference. This should fix your issue.