Socket,局域网内发送数据时,在XP环境下测试正常,但是在win2003下测试提示“未知主机”
public void send(string IP, string Txt)
        {
            //string hostName = IP;
            int port = Int32.Parse("8899");
            //IPHostEntry ipInfo = Dns.GetHostEntry(hostName);
            //IPAddress[] ipAddr = ipInfo.AddressList;
            //IPAddress ip = ipAddr[0];
            IPEndPoint hostEP = new IPEndPoint(IPAddress.Parse(IP), port);
            Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
            try
            {
                socket.Connect(hostEP);
            }
            catch (Exception se)
            {
                System.Web.HttpContext.Current.Response.Write("连接错误" + se.Message);
            }
            string sendStr = Txt;
            byte[] bytesSendStr = new byte[1024];
            bytesSendStr = Encoding.ASCII.GetBytes(sendStr);
            try
            {
                socket.Send(bytesSendStr, bytesSendStr.Length, 0);
            }
            catch (Exception ce)
            {                System.Web.HttpContext.Current.Response.Write("发送错误:" + ce.Message);
            }
            socket.Shutdown(SocketShutdown.Both);
            socket.Close();
        }请高手帮我看,这是代码的问题。还在在2003下要做一些相应的设置。