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,480 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
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 400 total points
ID: 9621669
0
 
LVL 21

Expert Comment

by:ap_sajith
ID: 9753583
Hi,
Any Updates?

Cheers!!
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
API Location, separating out information 10 46
JSON error 4 51
XML Parsing Classic ASP 5 50
IP API - need data... 4 13
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…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
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 …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

920 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

15 Experts available now in Live!

Get 1:1 Help Now