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,489 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
[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
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
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…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

635 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