Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Strange  ASP VBScript timeout error when consuming .NET Web Service...timeout from ServerXMLHttp.4.0 even though timeouts are set to very high values.

Posted on 2003-10-25
3
Medium Priority
?
1,504 Views
Last Modified: 2007-12-19
I have been working on this problem for several days, and would greatly appreciate any advice I can receive.  We have an ASP page that calls a .NET web service we have developed in C++.  When we query the web service directly through the generated ASMX file we get the expected XML response.  It always works!  

However, the same queries under the same conditions from our ASP page will sometimes fail.  When it does we get the error... "The data necessary to complete this operation is not yet available."  We do know that the request can take up to 30 seconds to process, but the ASMX just waits until it receives results.  Whereas our code does not, even with timeouts for every object we touch set to very high values.

We are using MSXML v4.0 with the latest service pack.  The underlying WinHTTP is version 5.1.  In our ASP code we instantiate the ServerXMLHTTP.4.0 object.  We call the open and send methods using a GET request.  We have used the WinHTTP trace utility to look at what is hapenning when it breaks.  The error lines are as follows:

12:16:33.687 ::*0000001* :: WinHttpSendRequest() returning TRUE
12:16:33.687 ::*0000001* :: WinHttpReceiveResponse(0x353d000, 0x0)
12:17:34.218 ::*0000001* :: Winsock/RPC/SSL/Transport error: 0x274c [WSAETIMEDOUT]
12:17:34.218 ::*0000001* :: WinHttpReceiveResponse: error 12002 [ERROR_WINHTTP_TIMEOUT]
12:17:34.218 ::*0000001* :: WinHttpReceiveResponse() returning FALSE
12:17:34.250 ::*0000001* :: IWinHttpRequest::Send() returning 2147954402 [?] (0x80072ee2)

We have tried raising the timeouts, but we still get this error.  Also the trace reveals that the timeout is happening with one second of the query being initialized which leads us to believe this isn't just a simple timeout issue.

The strangest thing is that the ASMX always works, but when we look at the trace, there are no differences in how the request is handled.  The ASMX file itself tells us a post is being issued, but the trace shows GET.

I tried to put all the information in here.  I hope someone can help us out.

Thanks,
Ayo
0
Comment
Question by:ijidak
  • 2
3 Comments
 
LVL 58

Assisted Solution

by:Gary
Gary earned 300 total points
ID: 9620365
One possible suggestion is do a loop until the readystate=4
Something like...

Set XMLHttp = CreateObject("Microsoft.XMLHTTP")
XMLHttp.async = false

Do Until XMLHttp .ReadyState = 4
' Wait until xmldoc is loaded before continuing.
Loop
...
...
Then on as normal.
0
 
LVL 21

Accepted Solution

by:
ap_sajith earned 1200 total points
ID: 9621669
0
 
LVL 21

Expert Comment

by:ap_sajith
ID: 9753583
Hi,
Any Updates?

Cheers!!
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

927 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