I am deploying ASP.Net MVC 3 application on Windows 2008 R2 server. I published the application from Visual Studio 2010 using File System. I have two assemblies that have delay signed and have valid snk file. The deployment was done using xcopy as it is internal application.
But there were some solution related changes after some time. I renamed the two assemblies but have not changed snk files. Now after deployment, I am getting following error -
Could not load file or assembly MyApplication 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)
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.IO.FileLoadException: Could not load file or assembly My doneApplication' 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)
Can somebody help me to sort this issue?
I am basically a Winforms guy and learning Web in my office. Recently I ran into same problem but got it resolved. I noticed, in my case I did not have Windows SDK for Windows 7 and .NET Framework 4 installed on my machine. Try installing this and restart system.
You need to verify your assembly using sn.exe
. Open command prompt in admin mode
sn.exe -Vr publicTokenNumber
The above will verify the delay signed assembly. Sn.exe
can be found in C:\Program Files\Microsoft SDKs\Windows\v6.1\bin
and C:\Program Files\Microsoft SDKs\Windows\v6.1\bin\x64
path. Try to run both the exe files and verify your assembly. I have given a similar answer here. You can also refer that.
Hope it helps.