473,406 Members | 2,387 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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 4612
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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,...

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.