0
I am trying to create a communication between client and server via SNMP protocol, and to begin, I installed Visual Studio 2017 and downloaded, via Nuget, the Lextm.SharpSnmpLib. I searched the Internet for an example of code so I could find a base. Until I reach this code:
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();
}
}
}
is firing an exception in the file 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
What could it be? How can I find such a widespread error?
the repository of that library is: https://github.com/lextudio/sharpsnmplib ? has tried to clone and find this error?
– Ricardo Pontual
I don’t know, I downloaded the library via Nuget, I’ll check
– leandroTraceviaSA
It seems that it is yes, only I do not know the version of the library that this link has, here in my project is 11.3.0
– leandroTraceviaSA