473,320 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Webexception first time

I have a console application in C#, which calls a .net webservice.
The .net webservice calls a stored procedure to retrieve the data.
The sp runs for around 3 minutes and get the results. The first time, I
get the exception
and the next time I understand it is in the buffer cache and it is able
to run without error.

I have made the following changes so far
1. Changed web.config in the webservice to have the http execution time
out to be high
<httpRuntime maxRequestLength="1048576" executionTimeout="4000"/>
2. I have the console application which is the caller to have
webservice.timeout = 60*1000;
3.I did not want to change the machine.config, as it will effect all
other projects.

I get the following webexception still after implement 1 and 2 ( A
WebException occurred while executing the requested operation.
Message: The operation has timed-out.)
Is there anything I am missing other than machine.config ?

Thanks

Sep 6 '06 #1
3 3409
Hi Srini,

I'm guessing your web service call times out. The default is 100 000
milliseconds before it gives up waiting.
Set the Timeout property before you call the service.
On Wed, 06 Sep 2006 23:50:00 +0200, srini <sr**************@gmail.com
wrote:
I have a console application in C#, which calls a .net webservice.
The .net webservice calls a stored procedure to retrieve the data.
The sp runs for around 3 minutes and get the results. The first time, I
get the exception
and the next time I understand it is in the buffer cache and it is able
to run without error.

I have made the following changes so far
1. Changed web.config in the webservice to have the http execution time
out to be high
<httpRuntime maxRequestLength="1048576" executionTimeout="4000"/>
2. I have the console application which is the caller to have
webservice.timeout = 60*1000;
3.I did not want to change the machine.config, as it will effect all
other projects.

I get the following webexception still after implement 1 and 2 ( A
WebException occurred while executing the requested operation.
Message: The operation has timed-out.)
Is there anything I am missing other than machine.config ?

Thanks


--
Happy Coding!
Morten Wennevik [C# MVP]
Sep 7 '06 #2
Morten
I thought thats what I am doing in the console application. I changed
from 60000
to 100000 and it still fails. would you mind reading the problem again
?

thanks

Morten Wennevik wrote:
Hi Srini,

I'm guessing your web service call times out. The default is 100 000
milliseconds before it gives up waiting.
Set the Timeout property before you call the service.
On Wed, 06 Sep 2006 23:50:00 +0200, srini <sr**************@gmail.com>
wrote:
I have a console application in C#, which calls a .net webservice.
The .net webservice calls a stored procedure to retrieve the data.
The sp runs for around 3 minutes and get the results. The first time, I
get the exception
and the next time I understand it is in the buffer cache and it is able
to run without error.

I have made the following changes so far
1. Changed web.config in the webservice to have the http execution time
out to be high
<httpRuntime maxRequestLength="1048576" executionTimeout="4000"/>
2. I have the console application which is the caller to have
webservice.timeout = 60*1000;
3.I did not want to change the machine.config, as it will effect all
other projects.

I get the following webexception still after implement 1 and 2 ( A
WebException occurred while executing the requested operation.
Message: The operation has timed-out.)
Is there anything I am missing other than machine.config ?

Thanks

--
Happy Coding!
Morten Wennevik [C# MVP]
Sep 7 '06 #3
Never mind, just realized we are dealing with milliseconds. It works
now after changing to 300 seconds.
srini wrote:
Morten
I thought thats what I am doing in the console application. I changed
from 60000
to 100000 and it still fails. would you mind reading the problem again
?

thanks

Morten Wennevik wrote:
Hi Srini,

I'm guessing your web service call times out. The default is 100 000
milliseconds before it gives up waiting.
Set the Timeout property before you call the service.
On Wed, 06 Sep 2006 23:50:00 +0200, srini <sr**************@gmail.com>
wrote:
I have a console application in C#, which calls a .net webservice.
The .net webservice calls a stored procedure to retrieve the data.
The sp runs for around 3 minutes and get the results. The first time, I
get the exception
and the next time I understand it is in the buffer cache and it is able
to run without error.
>
I have made the following changes so far
1. Changed web.config in the webservice to have the http execution time
out to be high
<httpRuntime maxRequestLength="1048576" executionTimeout="4000"/>
2. I have the console application which is the caller to have
webservice.timeout = 60*1000;
3.I did not want to change the machine.config, as it will effect all
other projects.
>
I get the following webexception still after implement 1 and 2 ( A
WebException occurred while executing the requested operation.
Message: The operation has timed-out.)
Is there anything I am missing other than machine.config ?
>
Thanks
>


--
Happy Coding!
Morten Wennevik [C# MVP]
Sep 7 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Joe Bloggs | last post by:
I have a C# MRS application that uses the ReportingService's Render method to retrieve a byte array containing a report. The following error message occurs An unhandled exception of type...
2
by: genc_ ymeri at hotmail dot com | last post by:
Hi, I'm trying to recieve the response status code rather than the message in the below code : try { responseArray = myWebClient.UploadValues(uriString,"POST",myNameValueCollection); }...
0
by: Matt | last post by:
(can't find any of my previous post for same issue. please CC to my email address as well. Thanks!) Hi all, What is the possible reason that HttpWebRequest.GetRequestStream() may hang there...
1
by: etantonio | last post by:
Good morning, I've a problem, in the past I translate my site from google or altavista with a code similar to this : <%@ Page Language="c#" Trace="true" Debug="true" %> <%@ import...
1
by: Tim Reynolds | last post by:
Team, From a windows service, we consume a web service on another server and occasionally receive System.Net.WebException: The underlying connection was closed:. For some clients we call, we do...
8
by: Tim Reynolds | last post by:
Our .Net application calls a web method of aplpication 2 that resides on their Apache server. When I as a developer C#, Studios 2003, make the call to their web method from my desktop, I receive no...
2
by: Scott McFadden | last post by:
When I invoke two web service methods sequentially with no delay, the first web method invocation goes smooth while the 2nd one generates the dredded: System.Net.WebException: The underlying...
4
by: =?Utf-8?B?UGhpbGlwIEs=?= | last post by:
Simplifying the code a bit its like this: try { myRemotingObj.Myfunction(string, string,string,string,timeSpan) } catch(WebException) { commsUp = false; }
0
by: DBC User | last post by:
Hello, One of my client reports they are getting "System.Net.WebException: The underlying connection was closed: The connection was closed unexpectedly." error suddently from the last week. None...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.