authentication and access control (.NET socket connection)

Discussion in 'ASP .Net Security' started by Dan, Mar 18, 2005.

  1. Dan

    Dan Guest

    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
    Dan, Mar 18, 2005
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > 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
    >
    >
    Feroze [msft], Mar 24, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Laszlo Nagy
    Replies:
    1
    Views:
    4,818
    Mark Wooding
    Jan 27, 2009
  2. Jean-Paul Calderone
    Replies:
    0
    Views:
    966
    Jean-Paul Calderone
    Jan 27, 2009
  3. Laszlo Nagy
    Replies:
    0
    Views:
    545
    Laszlo Nagy
    Feb 1, 2009
  4. Steve Holden
    Replies:
    0
    Views:
    662
    Steve Holden
    Feb 1, 2009
  5. Steve Holden
    Replies:
    1
    Views:
    715
Loading...

Share This Page