Solved

WebService Timeout

Posted on 2006-11-26
4
4,215 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now