Hi,
I want to change the following command line working command in to C# code, how can i do that?
system logging action set memory memory-lines = 1000
Tried tik4net and mikrotik low level api:
using (ITikConnection connection = ConnectionFactory.CreateConnection(TikConnectionType.Api))
{
connection.Open(RouterIpAddress, RouterUserName, RouterPassword);
var command = connection.CreateCommandAndParameters("/system/logging/action/set", "/memory/memory-lines", "1000");
command.ExecuteNonQuery();
}
MK mikrotik = new MK(RouterIpAddress);
if (mikrotik.Login(RouterUserName, RouterPassword))
{
mikrotik.Send("/system/logging/action/set");
mikrotik.Send("/memory/memory-lines=1000", true);
}
mikrotik.Close();
Neither works.
What am i doing wrong?
