[Mono-list] Socket problem

Peter Dennis Bartok peter at novonyx.com
Wed Jul 12 14:24:25 EDT 2006

I may be wrong, but I thought you needed root rights for ICMP. Have you 
tried running your mono app as root?


-----Original Message-----
From: <analyzer2 at gmx.net>
To: <mono-list at lists.ximian.com>
Date: 12 July, 2006 12:14
Subject: [Mono-list] Socket problem

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();
TimeSpan span = ping.Send("", 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 

Do you have any idea?



Echte DSL-Flatrate dauerhaft für 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl
Mono-list maillist  -  Mono-list at lists.ximian.com

More information about the Mono-list mailing list