Failed to load the file or assembly "Newtonsoft.Json" or one of its dependencies

Failed to load the file or assembly "Newtonsoft.Json" or one of its dependencies. The strong name signature could not be verified. The assembly may have been tampered with, or has been delayed signing, but not fully signed with the correct private key. (an exception from HRESULT:0x80131045)
Description: the execution of the current Web request, an unhandled exception occurred. Please check the stack trace information, to learn about the cause detailed information about the error and where it originated in the code.

Exception details: System.IO.FileLoadException: failed to load the file or assembly "Newtonsoft.Json" or one of its dependencies. The strong name signature could not be verified. The assembly may have been tampered with, or has been delayed signing, but not fully signed with the correct private key. (an exception from HRESULT:0x80131045)

Source error:

The execution of the current Web request an unhandled exception was generated during the. You can use the following exception stack trace information about the error and location information.

Assembly load tracking: the following information to help determine the assembly "Newtonsoft.Json" cannot be loaded.


Warning: assembly binding logging was closed.
To enable the assembly binding failed log record, please send the registry value [HKLM\Software\Microsoft\Fusion! EnableLog] (DWORD) is set to 1.
Note: there will be some failure associated with assembly binding logging performance loss.
To turn off this feature, please remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].



The stack trace:


[FileLoadException: failed to load file or assembly "Newtonsoft.Json" or one of its dependencies. The strong name signature could not be verified. The assembly may have been tampered with, or has been delayed signing, but not fully signed with the correct private key. (an exception from HRESULT:0x80131045)]

[FileLoadException: failed to load file or assembly "Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" or one of its dependencies. The strong name signature could not be verified. The assembly may have been tampered with, or has been delayed signing, but not fully signed with the correct private key. (an exception from HRESULT:0x80131045)]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46

[ConfigurationErrorsException: failed to load file or assembly "Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" or one of its dependencies. The strong name signature could not be verified. The assembly may have been tampered with, or has been delayed signing, but not fully signed with the correct private key. (an exception from HRESULT:0x80131045)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +54
System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +600
System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +125
System.Web.Compilation.BuildManager.CompileCodeDirectories() +265
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +320

[HttpException (0x80004005): Failed to load the file or assembly "Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" or one of its dependencies. The strong name signature could not be verified. The assembly may have been tampered with, or has been delayed signing, but not fully signed with the correct private key. (an exception from HRESULT:0x80131045)]
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +58
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +512
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +729

[HttpException (0x80004005): Failed to load the file or assembly "Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" or one of its dependencies. The strong name signature could not be verified. The assembly may have been tampered with, or has been delayed signing, but not fully signed with the correct private key. (an exception from HRESULT:0x80131045)]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8913739
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +85
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +259




--------------------------------------------------------------------------------
Version information: Microsoft.NET Framework version: 2.0.50727.4971; ASP.NET version: 2.0.50727.4971

Started by Bernard at November 24, 2016 - 12:45 PM

You haven't I told you the same question

Posted by Regan at November 26, 2016 - 1:28 PM

To have a try, or upgrade your version of asp.net.

Posted by Tina at December 10, 2016 - 1:34 PM

To add a reference to try.
Version of the.Net framework Newtonsoft.Json corresponding to different have different DLL

Posted by Jeffery at December 11, 2016 - 1:35 PM

If the referenced Newtonsoft.Json source code, if it is, look at the properties of Newtonsoft.Json project is also checked the signature, if checked, needs to use the SN command to generate a key file, and use it to sign, and then put the project in the "30ad4fe6b2a6aeed" key to replace your public key.

Posted by Sunny at December 23, 2016 - 2:25 PM

Your project with a strong name, the Newtonsoft.Json default is none, so cannot generate DLL

Posted by Jay at January 01, 2017 - 2:55 PM

Have forgot how to solve.

Posted by Berg at January 09, 2017 - 3:45 PM