Solved

WebService Timeout

Posted on 2006-11-26
4
4,232 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

726 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