Could not load file or assembly, Strong name signature could not be verified

3

I am having a nightmare :(

I developed a website in MVC using .Net 4.5.1 and it been working for months and after i updated the code (just one string line) it suddenly crashed and nothing is working.

The problem seems to be in the bin folder or references because every time i run the application i get this error:

Could not load file or assembly 'XXXXXX' or one of
its dependencies. Strong name signature could not be verified.  The assembly 
may have been tampered with, or it was delay signed but not fully signed 
with the correct private key. (Exception from HRESULT: 0x80131045)`

Where XXXXXX could be ANY referenced library such as

HtmlAgilityPack.dll
Microsoft.Web.Infrastructure.dll
System.Web.Helpers.dll
System.Web.Mvc.dll
System.Web.Razor.dll
System.Web.Webpages.Deployment.dll
System.Web.Webpages.dll
System.Web.Webpages.Razor.dll
TSPWebBased.dll

See? Any kind of library which i have NEVER touched or altered.

And the thing that is really driving me CRAZY is that the project works PERFECTLY on my computer but when i try to deploy it to a VPS or shared hosting or managed hosting it fails.

I installed many versions of .Net but no luck.

I spent days trying to solve it and no luck. I have searched google and read all the articles about this problem in stackoverflow but nothing helped me.

I would really really appreciate it if anybody could tell me what the HECK is this thing?

Thank you.

EDIT 1

I read this issue from HERE and i feel like this is close to my issue.

EDIT 2 (SOLVED)

I just had to re install my operating system (Windows 8) because when i was installing Visual Studio the installation was interrupted and DLLs were corrupted.

c#
visual-studio
dll
.net-assembly
asked on Stack Overflow Mar 22, 2015 by Basem Sayed • edited May 23, 2017 by Community

1 Answer

0

I recommend that you always use TFSVC(Team Foudation Server) or git(GitHub) for source control, My solution was to delete my project directory on my local machine and clone the project from my remote git repository. This saved me a lot of time. I hope this works for you guys... Happy coding...

answered on Stack Overflow Nov 9, 2016 by Lesiba Phokela

User contributions licensed under CC BY-SA 3.0