c# code running error

0 Answers 182 Views
Windows
walker
Top achievements
Rank 1
walker asked on 09 Jun 2021, 05:06 PM

I am writing a dll file and need to extract json from the response information. When I use c# to write the following code, I run an error in fiddler, please help me. Thank you very much.

dynamic  data = JObject.Parse(source);
 string re = data.result;

 

 

runing  result :

Fiddler has encountered an unexpected problem with an extension. Could not load the file or assembly "Newtonsoft.Json,Version=13.0.0.0, Culture=neutral,PublickeyToken=30ad4fe6b2a6aeed" or one of its dependencies. The system can not find the file specified.
Type:System.IO.FileNotFoundException
Source:sms
Nick Iliev
Telerik team
commented on 11 Jun 2021, 06:53 AM


The error indicates that the library (Newtonsoft.Json) is missing, which is expected as it is an external NET assembly that needs to be provided. You could use the built-in methods as discussed here.

Alternatively, you could also add a .NET assembly reference and switch from JScript.NET to C# via Tools > Options > Scripting > Language

walker
Top achievements
Rank 1
commented on 22 Jun 2021, 06:26 AM

Yes, I have solved the problem. The version of Newtonsoft.Json.dll in fiddler is 11.0.2, and the version of Newtonsoft.Json lib used by Microsoft Visual Studio Community 2019 is 13.0 and finally adjusted to 11.0.2. The problem is solved

No answers yet. Maybe you can help?

Tags
Windows
Asked by
walker
Top achievements
Rank 1
Share this question
or