Newtonsoft.JSON 라이브러리를 사용하는 .NET 2.0 C# 프로젝트에서 작업하고 있습니다. web.config 파일을 확인하면 모든 어셈블리가 2.0 버전을 참조합니다..NET 3.5 예기치 않은 오류가 발생하여 포함했습니다.
그러나 나는 다음과 같은 오류 얻을 서버에 배포 할 때 :
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에서의 그 어셈블리는 어디서 올 수 있습니까?
마크, 오른쪽 .NET 2.0 Newtonsoft 라이브러리를 사용하고 있습니다. Visual Studio 2008로 컴파일하면 .NET 2.0을 대상으로 오류가 표시되지 않습니다. –
사실 Newtonsoft 라이브러리는 오래되었습니다. 2.0 버전으로 업그레이드했을 때 모두 정상적으로 작동했습니다. 감사. –