Glossary Item Box

PowerSNMP for .NET

QuickStart

First, just compile and run the provided SNMP manager sample application. This application will show what agents are currently active on your network. Now you are ready to code something up for yourself!

  1. First you’ll have to start Visual Studio and make a new Windows Forms application. It works fine under ASP.NET also, but we’ll use a Windows Forms application for this example. We are using Visual Studio version 1 for the examples in this documentation.
  2. If the Manager component is not yet inserted into the “Components” section of your Visual Studio Toolbox, just right-click on your Toolbox and add the Manager component (if you sort by namespace it will be easier to find as part of the Dart.PowerSNMP namespace).
  3. Once added to the Toolbox, you can select it and insert it onto the main form. You will now see a small icon below the form labeled as “manager1” (under C#). Insert a “using Dart.PowerSNMP” line at the beginning of the main.cs file.
  4. Now add a button to your form.
  5. Double-click on the button, and add the following code:
[C#]
GetMessage msg = new GetMessage();
msg.Variables.Add(new Variable(new Dart.PowerSNMP.MibObject.sysUpTime()));
ResponseMessage[] responses = manager1.GetResponses(msg);
// responses contains a response from each Agent on the net

It’s that easy! From this simple scenario you can move to more complex ones that use other messages, such as SetMessage to perform update operations. We’ve also included table manipulation support, so even complex table manipulations can be accomplished within the friendly Visual Studio environment. If you’re not using Visual Studio, you can still use PowerSNMP just like you would any other product. Thank you for choosing PowerSNMP!

 

Related Sections

Quick Start
Discusses how to quickly get up and running with PowerSNMP for .NET.
Getting Started
Provides an overview of PowerSNMP for .NET and discusses such topics as distribution, licensing, and support.
Using the SNMP Components
Discusses how to use the SNMP components to send and receive SNMP requests, as well as how to generate class files from mibs.
Assembly Overview
Provides a language/syntax reference for PowerSNMP for .NET.
Samples
Describes the samples that are installed with PowerSNMP for .NET.

 

 


Send comments on this topic.

Documentation version 1.2.0.0.

© 2008 Dart Communications.  All rights reserved.