0

I installed Sitecore 9.1.1 but I'm getting an error message:

Could not load file or assembly 'ChilkatDotNet47' or one of its dependencies. An attempt was made to load a program with an incorrect format.

The documentation does list "Microsoft Visual C++ 2015 Redistributable" as a requirement and without it Sitecore will fail to start up with the above message.

However I have this requirement installed but still cannot get past this error.

Any suggestions will be much appreciated.

  • 2
    Post the full stack trace please. Ensure you are running in a 64 bit application pool. – Mark Cassidy May 18 '19 at 7:38
5

You're probably running into a pretty common issue. I've detailed the steps below, but they're sourced from: https://www.sitecorenutsbolts.net/2018/03/12/Sitecore-9-Installation-Could-not-load-file-or-assembly-ChilkatDotNet46/

  1. Go to your site's application pool settings.
  2. Ensure Enable 32-bit Applications is set to False

application pool settings

If that doesn't solve your problem, we'll need a bit more information. You can see the detailed stack trace for why this assembly isn't loading by doing two different things:

Look at the loader exceptions while debugging

This will normally catch 99% of problems when attempting to load assemblies.

  1. Attach the VS debugger to your site
  2. In the "Exception Settings" window (Debug -> Windows -> Exception Settings) break on the following: System.IO.FileLoadException and System.TypeLoadException. If the full stack trace is throwing a different exception you can break on that as well. Exception Settings
  3. Look at the exception details. Depending on the exception thrown look at the LoaderExceptions property. You may need to drill down into each child InnerExceptions property to see more detailed information.

If the above fails to give you any decent information you'll need to enable fusion logging and view the logs generated from that:

Enable Fusion (Fuslogvw.exe) logging in your environment

Follow the instructions laid out in this SO post (using regedit): https://stackoverflow.com/questions/255669/how-to-enable-assembly-bind-failure-logging-fusion-in-net

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion
Add:
DWORD ForceLog set value to 1
DWORD LogFailures set value to 1
DWORD LogResourceBinds set value to 1
DWORD EnableLog set value to 1
String LogPath set value to folder for logs (e.g. C:\FusionLog\)

Once that is enabled, run the Fuslogvw.exe (https://docs.microsoft.com/en-us/dotnet/framework/tools/fuslogvw-exe-assembly-binding-log-viewer) tool, recycle your application pool and inspect any logs that appear for the problem DLL.

Remember to revert those registry settings after you've gathered those logs (or hopefully solved the issue). Otherwise you'll be wasting a lot of disk space and CPU!

Let us know what you find!

| improve this answer | |
  • This is exact right. If you enable fusion it will tell you what is missing from the requested dll. – Chris Auer May 19 '19 at 16:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.