Estou tentando criar uma comunicação entre cliente e servidor via protocolo SNMP, e para começar, instalei o Visual Studio 2017 e baixei, via NuGet, a library Lextm.SharpSnmpLib. Procurei na internet um exemplo de código para que eu pudesse uma base. Até chegar neste código:
using Lextm.SharpSnmpLib;
using Lextm.SharpSnmpLib.Messaging;
using System;
using System.Collections.Generic;
using System.Net;
using System.Windows.Forms;
namespace SNMPGetStart
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void label1_Click(object sender, EventArgs e)
{
}
private void btnAtualizar_Click(object sender, EventArgs e)
{
var result = Messenger.Get(VersionCode.V2,
new IPEndPoint(IPAddress.Parse("127.0.0.1"), 161),
new Lextm.SharpSnmpLib.OctetString("public"),
new List<Variable> { new Variable(new ObjectIdentifier("1.3.6.1.2.1.1.5")) },
60000);
txtIP.Text = result.ToString();
}
}
}
está disparando uma exceção no arquivo SharpSnmpLib.dll
Exceção gerada: 'Lextm.SharpSnmpLib.Messaging.ErrorException' em SharpSnmpLib.dll
Ocorreu uma exceção sem tratamento do tipo "Lextm.SharpSnmpLib.Messaging.ErrorException" em SharpSnmpLib.dll
error in response
O que poderia ser? Como posso achar um erro tão generalizado?