authentication and access control (.NET socket connection)

D

Dan

Hi,

Can someone point me in the right direction on a really simple access
control issue? Here is the situation:

1. an app on a client computer connected to internet and executes this kind
of code:
acceptor = new Socket(AddressFamily.InterNetwork, SocketType.Stream,
ProtocolType.Tcp);
acceptor.Bind(new IPEndPoint(IPAddress.Any, port));
acceptor.Listen(ListenQueueSize);
socket = acceptor.Accept();

2. on a web server executes this kind of code:
socket.Connect(new IPEndPoint(ip, port));
sockets = socket;
nHosts += 1;
socket.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.NoDelay, 1);
socket.SetSocketOption(SocketOptionLevel.Socket,SocketOptionName.Linger,new
System.Net.Sockets.LingerOption(true, LingerTime));

This code executes fine, my problem is that the client asks for a user name
and password to access the server and I don't want that to happen, I want
the client (code) to know the server login so this dialog does not appear.

So my question is, how might this be done?

Thanks very much for helping!

Dan
 
F

Feroze [msft]

Can you give more details, as to what application/port your socket client is
connecting to?

--
feroze

-----------------
This posting is provided as-is. It offers no warranties and assigns no
rights.

See http://weblogs.asp.net/feroze_daud for System.Net related posts.
----------------

Dan said:
Hi,

Can someone point me in the right direction on a really simple access
control issue? Here is the situation:

1. an app on a client computer connected to internet and executes this kind
of code:
acceptor = new Socket(AddressFamily.InterNetwork, SocketType.Stream,
ProtocolType.Tcp);
acceptor.Bind(new IPEndPoint(IPAddress.Any, port));
acceptor.Listen(ListenQueueSize);
socket = acceptor.Accept();

2. on a web server executes this kind of code:
socket.Connect(new IPEndPoint(ip, port));
sockets = socket;
nHosts += 1;
socket.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.NoDelay, 1);socket.SetSocketOption(SocketOptionLevel.Socket,SocketOptionName.Linger,new
System.Net.Sockets.LingerOption(true, LingerTime));

This code executes fine, my problem is that the client asks for a user name
and password to access the server and I don't want that to happen, I want
the client (code) to know the server login so this dialog does not appear.

So my question is, how might this be done?

Thanks very much for helping!

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top