Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 39
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 39
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to get alert message when window is closed in excel for blank Anitha Excel Discussion (Misc queries) 0 November 30th 06 06:08 AM
Connection error Tiffany Excel Discussion (Misc queries) 0 May 2nd 06 03:53 AM
Connection error to network drive dmlw96 Excel Discussion (Misc queries) 0 September 30th 05 08:24 PM
XL - Oracle connection Error parthi4u Excel Discussion (Misc queries) 0 September 14th 05 08:45 PM
SUMIF Returns a #VALUE error when external source is closed ghynes Excel Discussion (Misc queries) 5 August 25th 05 03:11 PM


All times are GMT +1. The time now is 09:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"