Last post Jan 31, 2017 09:58 AM by Eric Du
Jan 30, 2017 10:25 AM|rammohan k|LINK
My code as follows...
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://............/GetAck");
request.PreAuthenticate = true;
request.CookieContainer = myContainer;
request.ContentType = "application/x-www-form-urlencoded";
String username = user;
String password = pwd;
String encoded = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding("ISO-8859-1").GetBytes(username + ":" + password));
request.Headers.Add("Authorization", "Basic " + encoded);
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;
request.Credentials = CredentialCache.DefaultCredentials;
using (Stream stream = request.GetRequestStream()) <-- Here am getting error..
soapEnvelopeXml.Save(stream); <--- Soap Message
Kindly give me clarity on the above issue..
*** Thanks In advance .. ***
Jan 31, 2017 09:58 AM|Eric Du|LINK
Hi rammohan k,
According to your description, as far as I know, if you use get method, usually don't have body in get request. Here are someone who meet the same problem as you. For more details, please refer to these solutions:
Cannot send a content-body with this verb-type: