I am working on a project that requires communicating and transferring files to a server that requires SSL communication. I'm currently developing in C# .NET 4.7.2 and have utilized RestSharp to communicate to this server via POST command. The issue I am running into now is I keep getting a certificate chain error, and I have captured this with fiddler. Fiddler gives me a popup as shown in the attachments. The curious thing is, if I don't have fiddler open, my code will not work and the file transfer fails, however, when fiddler is open and monitoring all processes, it will popup the certificate error, and if I click YES then the file will get transferred correctly.
Can any of the devs provide some insight on how I should implement my code to perform the same behavior that Fiddler does when ignoring unsafe errors? I have searched other resources online and have not been able to find a working solution.
I have found a few blog articles like this one: https://www.telerik.com/blogs/understanding-fiddler-certificate-generators
which have provided some insight but if anyone has more detail on how this implementation works I hope to build something similar like this in my application.
Really appreciate your help,