I'm trying to capture HTTP requests from .Net code running within a website on my local IIS. The calls are being made by proxy classes generated from a WSDL via a Connected Services reference. The recipient of the calls is claiming that the requests contain invalid payloads and I want to see the raw outgoing request from my end.
The service my code is calling requires TLS 1.2 and a client certificate. The code runs fine at runtime as long as I don't have Fiddler in the picture (other than the payload supposedly being incorrect).
I have configured the .Net web app to run through Fiddler as follows:
In Fiddler I can see the CONNECT commands are failing. I have the Fiddler HTTPS Protocols configured as "<client>;ssl3;tls1.0;tls1.1;tls1.2". I have exported the client certificate from the certificate store as a .cer and have added the following code to the end of the OnBeforeRequest() method (hostname and cert name changed for illustrative purposes):
The CONNECT request is as follows:
The CONNECT response is as follows:
I'm not sure why I'm getting the error or what I can do to rectify the problem.