// break point set here>>
webRequest = (HttpWebRequest)WebRequest.Create(server);
webRequest.Timeout = 30000;
webRequest.Credentials = CredentialCache.DefaultCredentials;
webRequest.Method = "POST";
webRequest.ContentType = "application/x-www-form-urlencoded";
webRequest.KeepAlive = false;
XmlDocument doc = new XmlDocument();
doc.AppendChild(request.ToXmlElement(doc));
byte[] data = XmlUtil.DocumentToBytes(doc);
webRequest.ContentLength = data.Length;
// write data to stream
requestStream = webRequest.GetRequestStream();
requestStream.Write(data, 0, data.Length);
requestStream.Close();
// get response
HttpWebResponse response = (HttpWebResponse)webRequest.GetResponse();
dataStream = response.GetResponseStream();
I set a break point at the first line above, but for some reason I lose it after webRequest = (HttpWebRequest)WebRequest.Create(server); completes, and never get to hit any debug points beyond in the next lines in this method. It's like it loses site of where it was in terms of debug break points and ultimately hits one later down the line instead of continuing to hit debug points I have added in here such as to the dataStream. I know it did not error out either because I ultimately do get a response back. I want to look at the dataStream but every time it goes out to make the request it never comes back and the rest of the code runs outside of this method after receiving back the response.