unable to connect to the server

Jul 10, 2012 at 12:02 PM

 XMPPClient.UserName = "admin@sdw2058";       

this is my code snippet, i get the error 

 

 first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.Net.dll

Setting state to Unknown Failed to connect: HostNotFound

 XMPPClient.Password = "ashwin";   

 XMPPClient.Server = "localhost"; 

 XMPPClient.Domain = "SDW2058";       

 XMPPClient.Resource = Guid.NewGuid().ToString();

 XMPPClient.Port = 5223;


            XMPPClient.UseOldStyleTLS = true;
            XMPPClient.UseTLS = true;
           
XMPPClient.AutoAcceptPresenceSubscribe = false;            XMPPClient.AutomaticallyDownloadAvatars = false;       

    XMPPClient.RetrieveRoster = false;
    XMPPClient.OnStateChanged += new EventHandler(XMPPClient_OnStateChanged);