Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
The underlying connection was closed - Error Message
Hi,
We have written a code in C# that send the data to the server in the XML Format and gets the response in return from the server and displays the same in the Excel. The complete server side code is in Java. I am getting an error message "The underlying connection was closed", when the client is waiting for the response from the Server.... This seems to be the time out issue.... Can any help me out as how to recover from this issue? Thanks, Sandeep |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
The underlying connection was closed - Error Message
Like,
I send the data from the c# code in the xml format, which is processed at the server side using Java and return the bulk of data back to the C# code. This is the code is C#, written to send the data to the server and get the response back from the server HttpWebRequest request = (HttpWebRequest)WebRequest.Create(mUrlPrefix); request.CookieContainer = new CookieContainer(); request.Method = "POST"; request.ContentType = "text/xml"; request.ContentLength = xmlContent.Length; request.Timeout = 1000000; setCookies(request, cookiesStr); try { writeToRequestStream(request, xmlContent); } catch (Exception e) { MessageBox.Show(e.Message.ToString()); } HttpWebResponse response = (HttpWebResponse)request.GetResponse(); Stream responseStream = response.GetResponseStream(); In some cases i get the reponse well from the server, but in other i am getting an erorr message "The underlying connection was closed " This error message is ususally thrown when the amount requested by the C# code is huge ....... Thanks, Sandeep "Sandeep" wrote: Hi, We have written a code in C# that send the data to the server in the XML Format and gets the response in return from the server and displays the same in the Excel. The complete server side code is in Java. I am getting an error message "The underlying connection was closed", when the client is waiting for the response from the Server.... This seems to be the time out issue.... Can any help me out as how to recover from this issue? Thanks, Sandeep |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to get alert message when window is closed in excel for blank | Excel Discussion (Misc queries) | |||
Connection error | Excel Discussion (Misc queries) | |||
Connection error to network drive | Excel Discussion (Misc queries) | |||
XL - Oracle connection Error | Excel Discussion (Misc queries) | |||
SUMIF Returns a #VALUE error when external source is closed | Excel Discussion (Misc queries) |