Hi,
Below is my code (ASP.net web project), but when i debug this asp page it takes ages to retrieve the response ? any idea why is this happening ?
and also the providers of the aURl mentioned to use req.connection="Close" but when i use that throws out an error. (im new to httpwebrequest sigh)
this is the documentation about connection -This value specifies that the connection is not to be a keep-alive connection.
var url = new Uri(@"My URL");
    HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
    req.KeepAlive = false;      
    req.Method = "POST";
    req.ContentType = "text/xml";
    //This Fails but the documentation asks to use this ??
    //req.Connection = "Close";
     var requestdata = File.ReadAllText(@"D:\request.txt");
    //req.ContentLength = requestdata.Length;
    StreamWriter myWriter = null;
    myWriter = new StreamWriter(req.GetRequestStream());
    myWriter.Write(requestdata);
    HttpWebResponse objResponse = (HttpWebResponse)req.GetResponse();