473,466 Members | 1,290 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

SNMP

hi sir/mam,

I am facing problem when i am developing a application to
implement SNMP protocol using C#.net
can u tell me how can i implement SNMP protocol in .net
please reply me soon
thanks
alok sengar
Jun 7 '06 #1
2 4613
There are numerous open source libraries ...Might be beneficial to look
through some already working code (or just use one as is as opposed to
making another wheel :)).

check out
http://www.c-sharpcorner.com/Code/2002/Sept/SnmpLib.asp
http://www.java2s.com/Code/CSharp/Ne...SimpleSNMP.htm
http://net-snmp.sourceforge.net/

Cheers,

Greg Young
MVP - C#
http://geekswithblogs.net/gyoung

"alok sengar" <al*********@suviinfo.com> wrote in message
news:O4**************@TK2MSFTNGP02.phx.gbl...
hi sir/mam,

I am facing problem when i am developing a application to
implement SNMP protocol using C#.net
can u tell me how can i implement SNMP protocol in .net
please reply me soon
thanks
alok sengar

Jun 7 '06 #2
hi,
I have already tried this URL's code
"http://www.java2s.com/Code/CSharp/Network/SimpleSNMP.htm"
but I am getting error when i am creating a UDP type Socket and recieving
packet from this socket.
some time error is---"An existing connection was forcibly closed by the
remote host"
and some time error is---
"A connection attempt failed because the connected party did not properly
respond after a period of time, or established connection failed because
connected host has failed to respond"
i am using this code for

try

{

IPHostEntry ihe = Dns.GetHostEntry(host);

IPEndPoint iep = new IPEndPoint(ihe.AddressList[0], 161);

EndPoint ep = (EndPoint)iep;

Socket sock = new Socket(ep.AddressFamily, SocketType.Dgram,
ProtocolType.Udp);
sock.SetSocketOption(SocketOptionLevel.Socket,
SocketOptionName.ReceiveTimeout, 1000);

sock.Connect(iep);
sock.SendTo(packet, snmplen, SocketFlags.None, iep);

//Receive response from packet

try

{

packet = new byte[1024];

int recv = sock.ReceiveFrom(packet, ref ep);
//here I am getting above written exceptions

catch (SocketException ex)

{

packet[0] = 0xff;

}

pls help me out of this its very urgent.
thanks
alok sengar


"Greg Young" <dr*******************@hotmail.com> wrote in message
news:Of**************@TK2MSFTNGP05.phx.gbl...
There are numerous open source libraries ...Might be beneficial to look
through some already working code (or just use one as is as opposed to
making another wheel :)).

check out
http://www.c-sharpcorner.com/Code/2002/Sept/SnmpLib.asp
http://www.java2s.com/Code/CSharp/Ne...SimpleSNMP.htm
http://net-snmp.sourceforge.net/

Cheers,

Greg Young
MVP - C#
http://geekswithblogs.net/gyoung

"alok sengar" <al*********@suviinfo.com> wrote in message
news:O4**************@TK2MSFTNGP02.phx.gbl...
hi sir/mam,

I am facing problem when i am developing a application to
implement SNMP protocol using C#.net
can u tell me how can i implement SNMP protocol in .net
please reply me soon
thanks
alok sengar


Jun 8 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Matthew Bell | last post by:
Hi, I'm looking for a high-performance SNMP manager toolkit (SNMPv1 / v2, GET / GETNEXT / GETBULK) I can use with Python on Windows2K/XP. I wonder if anyone has got any suggestions? Commercial...
1
by: dan byers | last post by:
hey everyone, i'm working on a system to monitor devices through SNMP. i'm using the Net::SNMP modules by D.Town. i try to load the snmp session request with a set of OIDs to make the system...
3
by: Kevin Ingram | last post by:
Is it possible to connect to devices and read SNMP data with ASP? I did a search and all I could find was utilities for sale to do it, wondered if it can be done using straight ASP. We are using...
1
by: ZacBowling | last post by:
Does anyone have an idea of how to access the SNMP API or WMI SNMP provider in C#/.NET? I need to query a Ascend MAX's SNMP service with a custom MIB in .NET. I won't be modify anything on the MAX...
0
by: Chris | last post by:
For the IBM DB2 Development following this group. SNMP is coming back in a big way. Changes in Version 2c and adoptions of Version 3 are ushering in the adoption of SNMP back into the enterprise....
0
by: ramgce2003 | last post by:
Dear all... We have an NMS Software(Created by using GUI(Window) based application in VC++) already used to comminicate to our SNMP Agent Note::: 1. Consider NMS Software(actas a client)...
1
by: Schroeder, AJ | last post by:
Hello group, I performed binary installs of Net-SNMP and PHP 4.4.4 on my Windows XP laptop so that I can do some offline development/testing away from my Linux server. Anyway, I attempted to do...
1
by: idoha | last post by:
Hi, I am trying to determine the SNMP status on remote machine. I need to distinguish between two possible options, where the SNMP is not active: 1)When the SNMP listener is not active on a...
1
by: Dirk Van de moortel | last post by:
{ OOPS, posted this to moderated group perl.cpan.discuss as well, so it can take a while to get through, if it gets through at all Otherwise sorry for duplicate posting } We need to set up a...
7
by: moon1 | last post by:
how will I change the code the 1st code according to the 2nd one? 1st code sub snmpGet(@) { # Assign arguments my ($deviceName)=$_; # Device name to read from my...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.