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
1,474 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 100 total points
Comment Utility
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 400 total points
Comment Utility
0
 
LVL 21

Expert Comment

by:ap_sajith
Comment Utility
Hi,
Any Updates?

Cheers!!
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Classic ASP + JS 4 67
EOF BOF error classic asp 8 28
Hide row when retrieving data from database 6 42
Auto Submit on dropdown box 14 27
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

744 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

16 Experts available now in Live!

Get 1:1 Help Now