Uploading Files using Socket Programming in .NET 1.1

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • govind161986
    New Member
    • Dec 2009
    • 21

    Uploading Files using Socket Programming in .NET 1.1

    When i execute the below mentioned code in .NET 1.1 i get the following error message "A socket operation was attempted to an unreachable host" but when i execute the same code in .NET 2.0 it executes successfully.

    Code:
    main_sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
            main_ipEndPoint = new IPEndPoint(Dns.GetHostByName(server).AddressList[0], port);
    
            try
            {
                main_sock.Connect(main_ipEndPoint);
            }
    Please help me in this regard.

    Thanks,

    Govind
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    Please do not double post your questions.
    You already have an on-going thread for this same question.

    Comment

    Working...