[Mono-list] Access Denied in Socket constructor

jcmag jcmag at yahoo.com
Mon Jan 15 08:32:35 EST 2007


It was 1000 (It was hard-coded in a library). Changed it and now it works.

Thanks for your quick answer!



Jean-Christophe



--------------------------

http://sourceforge.net/projects/myhal

----- Original Message ----
From: Nuno Marques <nmmstuff at sapo.pt>
To: jcmag <jcmag at yahoo.com>; mono-list at lists.ximian.com
Sent: Sunday, January 14, 2007 9:31:14 PM
Subject: Re: [Mono-list] Access Denied in Socket constructor


What port are you using? If it is below 1024, IIRC, you need to be root to  
use it.

nuno

On Sun, 14 Jan 2007 19:54:44 -0000, jcmag <jcmag at yahoo.com> wrote:

> In my program I created a Socket:
> Socket s = new Socket(endPoint.Address.AddressFamily, SocketType.Stream,  
> Protocol.Tcp);
>
> If I run my program like this:
> sudo mono myProgram.exe
> (I am on Ubuntu 6.10)
> It works.
>
> If I run my program without sudo, I have the following exception:
> System.Net.Sockets.SocketException: Access denied
>   at System.Net.Sockets.Socket.Bind (System.Net.EndPoint local_end)  
> [0x00000]
>
> Is there another way than using sudo to run my program?
>
> Thanks
>
>
>
>
> ____________________________________________________________________________________
> TV dinner still cooling?
> Check out "Tonight's Picks" on Yahoo! TV.
> http://tv.yahoo.com/









 
____________________________________________________________________________________
Bored stiff? Loosen up... 
Download and play hundreds of games for free on Yahoo! Games.
http://games.yahoo.com/games/front
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20070115/6e54df64/attachment-0001.html 


More information about the Mono-list mailing list