Hi
I am using Fiddler Classic v.5.0.20242.10753 for .NET 4.6.2 64-bit on Windows Server 2012R2 (don't ask!)
I am also using FiddlerScript in C# mode. My use case is that I am trying to create a temporary fix for a legacy service that is responding with incorrectly derived values in an XML payload. I can force all clients of this service to access it via Fiddler as a proxy, and I wanted to use FiddlerScript to modify the response to correct some of the data, as it can be derived from other parts of the response.
I did a very very rough PoC by catching the specific calls in OnBeforeResponse and making an arbitrary change. What I have then tried to do is use the System.XML XmlDocument object, pass it the response body when instantiating, and working from there.
THE PROBLEM: I have added "using System.XML;" to the script. I have also added "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.XML.dll" to the References field in Fiddler under Tools -> Options -> Scripting and restarted Fiddler Classic. However, when saving the script, I get an error "The type or namespace name 'XML' does not exist in the namespace 'System' (are you missing an assembly reference?)"
I have tried just about everything I can think of to make that reference:
- adding directly to the dll in the Windows dir
- copying the dll(s) to the same DIR as the Fiddler.exe (as suggested in your docs)
- adding the XML dlls to the GAC
Nothing I do seems to solve this problem. I thought it might be a .NET version issue, but I have 4.6.2 installed.
How do I properly reference other .NET assemblies that I want to use in script?
Thanks,
Steve.