System.Net.WebException: The underlying connection was closed: The remote name could not be resolved.
at System.Net.HttpWebRequest.CheckFinalStatus()
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult)
at System.Net.HttpWebRequest.GetRequestStream()
The form is on the same machine as the K2 server.
The code is identical on both the form and in the K2 ClientEvent
Any thoughts or hints?
System.Net.HttpWebRequest objRequest = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(URI);
objRequest.Method = "POST";
objRequest.ContentLength = vars.Length;
objRequest.ContentType = "application/x-www-form-urlencoded";
objRequest.CookieContainer = new System.Net.CookieContainer();
// objRequest.Credentials = System.Net.CredentialCache.DefaultCredentials;
objRequest.Credentials = new System.Net.NetworkCredential(username, password,domain);
System.IO.StreamWriter myWriter = new System.IO.StreamWriter(objRequest.GetRequestStream());
myWriter.Write(urlVariables);
myWriter.Close();