473,320 Members | 2,088 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,320 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 4600
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.