Skip to main content
kaansengul
New Member
September 19, 2019
Question

FortiAnalyzer WSDL Problem in C#

  • September 19, 2019
  • 0 replies
  • 2757 views

Hi All,

I'm trying connect to FortiAnalyzer to get some info. I saw that FortiAnalyzer is providing WSDL and I wrote a simple C# console app in .Net Core. I've added as "Connected Service" with url like this: "https://<fortianalyzer-ip>:8080/" (not ending with /FortiAnalyzerWSxml or /FortiAnalyzerWS)

 

When I run the app I got this error: https://pasteboard.co/Iy9fsDf.png

 

Sample code: 

 

var ws = new FortiAnalyzerApi.FortiAnalyzerWSPortTypeClient();
            ws.ClientCredentials.UserName.UserName = "user";
            ws.ClientCredentials.UserName.Password = "pass";
            ws.ClientCredentials.ServiceCertificate.SslCertificateAuthentication = new System.ServiceModel.Security.X509ServiceCertificateAuthentication()
            {
                CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.None,
                RevocationMode = System.Security.Cryptography.X509Certificates.X509RevocationMode.NoCheck
            };

            var result = ws.getSystemStatus(new FortiAnalyzerApi.getSystemStatus());

 

 

    Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
    Fortinet Flag the Hack. Wednesday, August 26, 9:00 AM - 5:00 PM ET, COSM, Atlanta, GA.