我正在使用 Newtonsoft.JSON 库开发一个 .NET 2.0 C# 项目。当我检查 web.config 文件时,所有程序集都指的是 2.0 版本。
但是,当我在服务器上部署时,出现以下错误:
Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
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.FileNotFoundException: Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 21: }
Line 22:
Line 23: Dictionary<string, string> config = JavaScriptConvert.DeserializeObject<Dictionary<string, string>>(jason);
Line 24:
Line 25: if (Request.Form["login"] == config["adminLogin"] && FormsAuthentication.HashPasswordForStoringInConfigFile(Request.Form["password"], "sha1") == config["adminPass"])
Source File: c:\Website\WSRecrut\Test\ConnectionPost.aspx Line: 23
Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Stack Trace:
[FileNotFoundException: Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.]
Newtonsoft.Json.Utilities.CollectionUtils.CreateDictionaryWrapper(Object dictionary) in D:\Newtonsoft\Projects\Json\trunk\Src\Newtonsoft.Json\Utilities\CollectionUtils.cs:422
Newtonsoft.Json.JsonSerializer.CreateObject(JsonReader reader, Type objectType, Object existingValue) in D:\Newtonsoft\Projects\Json\trunk\Src\Newtonsoft.Json\JsonSerializer.cs:223
Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType) in D:\Newtonsoft\Projects\Json\trunk\Src\Newtonsoft.Json\JsonSerializer.cs:169
Newtonsoft.Json.JavaScriptConvert.DeserializeObject(String value, Type type, JsonConverter[] converters) in D:\Newtonsoft\Projects\Json\trunk\Src\Newtonsoft.Json\JavaScriptConvert.cs:512
Newtonsoft.Json.JavaScriptConvert.DeserializeObject(String value, JsonConverter[] converters) in D:\Newtonsoft\Projects\Json\trunk\Src\Newtonsoft.Json\JavaScriptConvert.cs:485
Newtonsoft.Json.JavaScriptConvert.DeserializeObject(String value) in D:\Newtonsoft\Projects\Json\trunk\Src\Newtonsoft.Json\JavaScriptConvert.cs:457
ASP.connectionpost_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\Website\WSRecrut\Test\ConnectionPost.aspx:23
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +2113547
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
System.Web.UI.Page.Render(HtmlTextWriter writer) +26
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1896
有人有想法吗?3.5 上的那个程序集可能来自哪里?