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,487 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Scheduled IIS .Net2 AppPools recycle and SQL connection Hangs 33 183
JS does not refresh 6 44
Can't select treeview node from iframe 2 54
Passing ASP variables in JQuery 4 53
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

751 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