using System.Net;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
using FortianalyzerAPI.FA;
namespace FortianalyzerAPI
{
class Program
{
static void Main(string[] args)
{
//
// Need this to stop exception from being thrown on invalied SSL certificate on FA unit.
//
ServicePointManager.ServerCertificateValidationCallback = delegate(object sender, X509Certificate certificate, X509Chain chain,
SslPolicyErrors sslPolicyErrors) { return true; };
// Create web service
FortiAnalyzerWS ws = new FortiAnalyzerWS();
// Point webservice to FA webservice entry point
ws.Url = @" https://172.16.99.205:8080/FortiAnalyzerWS" ;
// Create message request, message request header, message request body
FortiRequest mr = new FortiRequest();
RequestHeader mrh = new RequestHeader();
RequestBody mrb = new RequestBody();
// Link the header and the body to the request
mr.Header = mrh;
mr.Body = mrb;
// Credentials into the header
mrh.UserName = " admin" ;
mrh.Password = " password" ;
// Load the request type
mrb.Item = new FortiAnalyzerGetSystemStatus();
// Make the request
FortiResponse myResponse = ws.FortiRequest(mr);
}
}
}
| User | Count |
|---|---|
| 2675 | |
| 1410 | |
| 810 | |
| 702 | |
| 455 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.