Solved

WebService Timeout

Posted on 2006-11-26
4
4,218 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Binding a check box in an Asp.net DataGrid 4 41
SQL best practice question 3 36
LINQ - C# to VB convertion 12 48
Error in query expression 3 37
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

863 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

25 Experts available now in Live!

Get 1:1 Help Now