CounterSoft User Forums

Welcome to CounterSoft User Forums Sign in | Join | Help
Home Forums

JSON

Last post 01-27-2010, 4:04 PM by MarkWing. 1 replies.
Sort Posts:
  •  01-27-2010, 3:30 PM

    JSON

    I get the following message when using a copy of the API .dlls that I downloaded today.  I think I need to include a reference to JSON, but I cannot determine which version--I've tried three, and all give me a public key token mismatch.

    How do I handle it?

    Exception information follows.

    Without JSON:

    System.IO.FileNotFoundException was unhandled
      Message="Could not load file or assembly 'Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=0e17ff0349390ca9' or one of its dependencies. The system cannot find the file specified."
      Source="CounterSoft.Gemini.WebServices"
      FileName="Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=0e17ff0349390ca9"
      FusionLog="=== Pre-bind state information ===\r\nLOG: User = [Redacted]
    \r\nLOG: DisplayName = Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=0e17ff0349390ca9\n (Fully-specified)\r\nLOG: Appbase = file:///C:/Documents and Settings/jmccormick/My Documents/Visual Studio 2008/Projects/geminiTests/geminiTests/bin/Debug/\r\nLOG: Initial PrivatePath = NULL\r\nCalling assembly : CounterSoft.Gemini.WebServices, Version=3.6.1.2571, Culture=neutral, PublicKeyToken=0e17ff0349390ca9.\r\n===\r\nLOG: This bind starts in default load context.\r\nLOG: No application configuration file found.\r\nLOG: Using machine configuration file from c:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\config\\machine.config.\r\nLOG: Post-policy reference: Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=0e17ff0349390ca9\r\nLOG: The same bind was seen before, and was failed with hr = 0x80070002.\r\n"
      StackTrace:
           at CounterSoft.Gemini.WebServices.BaseService.GetObjectFromResponse[T](Stream stream)
           at CounterSoft.Gemini.WebServices.BaseService.ThrowResponseException(WebResponse response)
           at CounterSoft.Gemini.WebServices.BaseService.ProcessResponse[T](String url, Object obj, RequestType requestType)
           at CounterSoft.Gemini.WebServices.BaseService.GetResponse[T](String url, Object o, RequestType r)
           at CounterSoft.Gemini.WebServices.BaseService.WhoAmI()
           at geminiTests.Program.Main(String[] args) in C:\Documents and Settings\jmccormick\My Documents\Visual Studio 2008\Projects\geminiTests\geminiTests\Program.cs:line 21
           at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
           at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
           at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
           at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           at System.Threading.ThreadHelper.ThreadStart()
      InnerException:

    With JSON referenced:

    System.IO.FileLoadException was unhandled
      Message="Could not load file or assembly 'Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=0e17ff0349390ca9' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"
      Source="CounterSoft.Gemini.WebServices"
      FileName="Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=0e17ff0349390ca9"
      FusionLog="=== Pre-bind state information ===\r\nLOG: User = [Redacted]\r\nLOG: DisplayName = Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=0e17ff0349390ca9\n (Fully-specified)\r\nLOG: Appbase = file:///C:/Documents and Settings/jmccormick/My Documents/Visual Studio 2008/Projects/geminiTests/geminiTests/bin/Debug/\r\nLOG: Initial PrivatePath = NULL\r\nCalling assembly : CounterSoft.Gemini.WebServices, Version=3.6.1.2571, Culture=neutral, PublicKeyToken=0e17ff0349390ca9.\r\n===\r\nLOG: This bind starts in default load context.\r\nLOG: No application configuration file found.\r\nLOG: Using machine configuration file from c:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\config\\machine.config.\r\nLOG: Post-policy reference: Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=0e17ff0349390ca9\r\nLOG: Attempting download of new URL file:///C:/Documents and Settings/jmccormick/My Documents/Visual Studio 2008/Projects/geminiTests/geminiTests/bin/Debug/Newtonsoft.Json.DLL.\r\nWRN: Comparing the assembly name resulted in the mismatch: PUBLIC KEY TOKEN\r\nERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.\r\n"
      StackTrace:
           at CounterSoft.Gemini.WebServices.BaseService.GetObjectFromResponse[T](Stream stream)
           at CounterSoft.Gemini.WebServices.BaseService.ThrowResponseException(WebResponse response)
           at CounterSoft.Gemini.WebServices.BaseService.ProcessResponse[T](String url, Object obj, RequestType requestType)
           at CounterSoft.Gemini.WebServices.BaseService.GetResponse[T](String url, Object o, RequestType r)
           at CounterSoft.Gemini.WebServices.BaseService.WhoAmI()
           at geminiTests.Program.Main(String[] args) in C:\Documents and Settings\jmccormick\My Documents\Visual Studio 2008\Projects\geminiTests\geminiTests\Program.cs:line 21
           at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
           at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
           at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
           at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           at System.Threading.ThreadHelper.ThreadStart()
      InnerException:

  •  01-27-2010, 4:04 PM

    Re: JSON

    It seems like the file is missing from the API download.
    Please download the Gemini API test harness: http://www.countersoft.com/downloads/v36/CounterSoft_Gemini_API_TestHarness_v3_6_0.zip and use the DLLs from the Lib folder.

View as RSS news feed in XML