Solved

WebService Timeout

Posted on 2006-11-26
4
4,221 Views
Last Modified: 2008-05-16
Struggling with timeouts on a webservice - not sure if it from client or server....

I have a long-running job (about 10 minutes) that I need to run in ASP.NET. I am using a webservice call to initiate the job in a client app:

        Dim t As New webschedule.com.domain.www.schedjobs
        t.Timeout = 120000
        EventLog1.WriteEntry("returned: " & CStr(DateTime.Now) & t.writexmljob)

On the server I have the web service.

In web.config I have increased the execution timeout:

<httpRuntime executionTimeout="720000" />

and still I get:

System.Net.WebException
  Message="The operation has timed out"
  Source="System.Web.Services"

What to do? any pointers would be much appreciated. I just need a simple, scheduled mechanism to run a job within ASP.NET that works consistently.

Thanks
0
Comment
Question by:ctudorprice
  • 3
4 Comments
 
LVL 1

Accepted Solution

by:
kulkarnivishwajit earned 500 total points
ID: 18017393
There are two places you may have to change:

1. Change the ASP.NET timeout, not ASP one:

http://www.devx.com/vb2themax/Tip/18803

This is the most likely culprit of your errors

2. Use the Timeout property of your proxy class to set the proper time on
the client.

WebReference.ProxyClass myProxy = new WebReference.ProxyClass();
// Set the timeout in milliseconds -- e.g. 100 seconds
myProxy.Timeout = 100000;

Hope that helps.

Regards,
kulkarnivishwajit
0
 

Author Comment

by:ctudorprice
ID: 18017472
hmm, i've read that advice before (verbatim)... in fact, here: http://www.thescripts.com/forum/thread426335.html

...and the executionTimeout is the aspx timeout. My question wasn't the same as the question in the link above.

Can anyone else help?

The job times-out after exactly 2 minutes.
0
 

Author Comment

by:ctudorprice
ID: 18036288
Just in case anyone else runs into this:
I turned off Process Pinging in the IIS Application Pool configuration and the problem was resolved. Basically, IIS pings the worker process periodically and if it doesn't respond, kills it and restarts it. Obvious now I've found it... but took me 3 days of hunting, googling, tweaking, testing and wasting time to eventually find it.
Sadly, this is a mystery because there is no logging in the event that IIS decides to kill a process (because it didn't respond) - it just disappears for no apparent reason. Jeez - you'd think the venerable folks at Microsoft would know better.... Had there been a log entry, this might have take 5 minutes to figure out.


0
 

Author Comment

by:ctudorprice
ID: 18036301
I'm going to award some points so this question is closed. But kulkarnivishwajit's answer isn't the right one in this case...
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question