Login  
Search All Forums
Dart Home | PowerSNMP for ActiveX | Custom Development Reply | PowerSNMP for ActiveX Topics | Forums   
AuthorForum: PowerSNMP for ActiveX
Topic: SNMP trap :: C# Console Application event not fired
lvasco@yahoo.com

From: paris, France
Posts: 3
Member Since: 10/21/05
posted June 6, 2006 10:02 AM

Hello,

i'm currently evaluating PowerTcp ActiveX to catch trap by using a windows service c# application. i start building a sample console application before moving on service...

here is my sample. would you please tell me what's wrong?

using System;
using System.Threading;
using DartSnmp;

namespace ConsoleApplication2
{
class Class1
{

private static AxDartSnmp.AxManager Manager1;

[STAThread]
static void Main(string[] args)
{

Manager1 = new AxDartSnmp.AxManager();
test();

while(true)
{
Thread.Sleep(5000);


}
}

public static void test()
{

Manager1.Trap +=new System.EventHandler(trp);
Manager1.Open(162, "192.168.0.18");

}

private static void trp(object sender, System.EventArgs e)
{
Console.Write("*****" + Manager1.AgentName );
}

}
}

Best regards,
lb
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted June 6, 2006 8:37 PM

There are some special things you need to do to get messages to work with the ActiveX controls in a .NET Service. Please see the last message in this thread for details:

http://support.dart.com/postings?topicid=3982

Please note, as I mentioned in the other thread that you posted, that this would not be a problem if your were using PowerSNMP for .NET

creiglee

From: United Arab Emirates
Posts: 1
Member Since: 07/07/15
posted July 7, 2015 3:42 AM

Find this one for more about C# console application.

http://csharp.net-informations.com/overview/csharp-console-application.htm

Lee
Reply | PowerSNMP for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX