Hello,
I want to disable and enable the rule in Ip>Firewall>NAT, knowing the comment rule.
I use a API in C#, and tik4net
Here is part of my code:
private void button1_Click(object sender, EventArgs e)
{
using (ITikConnection connection = ConnectionFactory.CreateConnection(TikConnectionType.Api))
{
string HOST = "ipAddress";
string USER = "login";
string PASS = "password";
connection.Open(HOST, USER, PASS);
var rules = connection.LoadSingle<FirewallNat>();
string OutText = rules.Id;
OutText = OutText + "Comment " + rules.Comment;
label1.Text = OutText;
}
}
I get an error: tik4net.TikCommandAmbiguousResultException: "only one response item expected, returned 2 items"
If I understand correctly, I am using the wrong extension. What do I need to use the extension, and how do I disable the rule?