You have to be root to send ICMP requests.

On Wed, 2006-07-12 at 20:14 +0200, [EMAIL PROTECTED] wrote:
Hello together

I use Mono to create a small C# console project. In this project I send an ping to check the host. I didn't write the ICMP class self. 

ICMP class: http://cpp.sourceforge.net/?show=17688

Code to use the class:
ICMP ping = new ICMP();
ping.Open();
TimeSpan span = ping.Send("66.249.85.104", new TimeSpan(0,0,5));

Unfortunately there is a exception:
Unhandled Exception: System.Net.Sockets.SocketException: Access denied
in <0x000b8> System.Net.Sockets.Socket:.ctor (AddressFamily family, SocketType type, ProtocolType proto)
in [0x00004] (at cPing.cs:41) ICMP:Open ()
in [0x00007] (at Main.cs:14) MainClass:Main (System.String[] args

I tested the same code to a Visual Studio 2005 Pro. installation. It runs fine. 

Do you have any idea?

Thanks.

Greetz
Karsten
*************************************************************************
The information contained in this communication is confidential, is
intended only for the use of the recipient named above, and may be
legally privileged.

If the reader of this message is not the intended recipient, you are 
hereby notified that any dissemination, distribution or copying of this
communication is strictly prohibited.

If you have received this communication in error, please resend this
communication to the sender and delete the original message or any copy
of it from your computer system.

Thank you.
*************************************************************************
_______________________________________________
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to