I have this problem with the instance of the Sitecore. A made a publish from VS project with the same Sitecore.Kernel.dll and Sitecore.Mvc.Dll of the instance. After that I cann't reach anymore the login page of the site. I have searched over the internet but i didn't find any reference of this problem. Any idea?

Could not load type 'Sitecore.SecurityModel.Cryptography.IHashEncryption' from assembly 'Sitecore.Kernel, Version=, Culture=neutral, PublicKeyToken=null'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.TypeLoadException: Could not load type 'Sitecore.SecurityModel.Cryptography.IHashEncryption' from assembly 'Sitecore.Kernel, Version=, Culture=neutral, PublicKeyToken=null'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

enter image description here

  • Could you make sure that you haven't override the web.config with one from your project? Feb 11, 2019 at 10:12
  • 1
    Are you sure you've referenced exactly the same version of Sitecore Kernel dll as your site uses?
    – Marek Musielak
    Feb 11, 2019 at 10:13
  • The web.config in the project was with the action:none, but the web.config in the view was with the action:content. So, I made a publish with the same action before and everything was ok. But when a copy and paste the Sitecore.Kernel.dll and Sitecore.Mvc.dll in my VS Project from my instance and made a publish, this error was appear.
    – Po Po
    Feb 11, 2019 at 10:16
  • Yes, the dll are the same
    – Po Po
    Feb 11, 2019 at 10:16
  • Which Sitecore version do you use? Feb 11, 2019 at 10:29

1 Answer 1


If the type IHashEncryption was there before you replace the DLL, that's code for you are really using two different DLL versions even if they look the same.

What I like to do in these situations is to use a decompiler to decompile the DLL and then make sure the expected type is really there.

You can do this on the new DLL and then on the old one. Most often than not I realize that I was using different DLLs .

I really love DotPeek (free), so feel free to take a look on this link.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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