Solved

xmlhttp timeout issue

Posted on 2004-08-11
7
4,111 Views
Last Modified: 2008-01-09
I am using Microsoft.xmlhttp to send a post to authorize.net for payment processing.  We have been seeing intermittent problems where we don't seem to recieve a response from the processor.  While this has worked perfectly for a year up until about a month ago, they are telling me that it's a timeout issue on our end.  What I'm trying to find out is whether I need to set a Server.scriptTimeout in the file, or if there is a timeout setting within the xmlhttp post that I need to be setting or both.

Any ideas?

This is the post/send portion of our script:
'Send the transaction data as part of the querystring
set xml = Server.CreateObject("Microsoft.XMLHTTP")
xml.open "POST", "https://secure.authorize.net/gateway/transact.dll?" & FINK, false
xml.send ""
                  
If xml.Status <> 200 Then Call ErrorConnecting
strRetval = xml.responseText
set xml = nothing

Sharpnet
0
Comment
Question by:sharpnet
[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
  • 4
  • 3
7 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 11776380
>>or if there is a timeout setting within the xmlhttp post that I need to be setting or both.<<
None that I know of, but there is with the ServerXMLHTTP component, that you should be using in any case.  The method is called "setTimeouts".  See here for more info:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/xmmthsetTimeoutsMethod.asp
0
 
LVL 3

Author Comment

by:sharpnet
ID: 11776441
but that's using an active x object right?  I'm not using active x. nor am I using msxml.  can you clarify a bit more?  Why should I be using this and how would it be used in conjunction with the code I offered as an example?
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 11776550
>>but that's using an active x object right?  I'm not using active x. nor am I using msxml. <<
It is part of MSXML and has been since v 3 (I believe)

>>Why should I be using this and how would it be used in conjunction with the code I offered as an example?<<
Read up on the link I posted and on the ServerXMLHTTP as well:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/xmobjxmldomserverxmlhttp.asp

Specifically, this section:
<quote>
The ServerXMLHTTP object offers functionality similar to that of the XMLHTTP object. Unlike XMLHTTP, however, the ServerXMLHTTP object does not rely on the WinInet control for HTTP access to remote XML documents. ServerXMLHTTP uses a new HTTP client stack. Designed for server applications, this server-safe subset of WinInet offers the following advantages:

Reliability — The HTTP client stack offers longer uptimes. WinInet features that are not critical for server applications, such as URL caching, auto-discovery of proxy servers, HTTP/1.1 chunking, offline support, and support for Gopher and FTP protocols are not included in the new HTTP subset.
Security — The HTTP client stack does not allow a user-specific state to be shared with another user's session. ServerXMLHTTP provides support for client certificates.
</quote>

Also, please maintain these old open questions:
1 07/01/2004 250 Text file save problem  Open Active Server Pages (ASP)
2 06/10/2004 125 Ad rotator in Windows application?  Open C#
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Author Comment

by:sharpnet
ID: 11776717
sorry that I'm sounding uneducated, but that's a lot of techno-babble to me as I happen to be learning a lot of this.  Are you suggesting I replace the code I have with the msxml code in this link?  How do I know if the component is installed?
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 250 total points
ID: 11780409
>>but that's a lot of techno-babble to me<<
See if this make more sense:
Time-Outs in XMLHTTP, and Controls with a View
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaskdr/html/askgui05012001.asp
But simply put: If you are going from server to server (as you are) you should use the ServerXMLHTTP component.

>>Are you suggesting I replace the code I have with the msxml code in this link? <<
Yes.

>>How do I know if the component is installed?<<
You will know, as otherwise you will get something like "can't create object".  If that is the case (and I doubt it), you can download version 4 sp2 from here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=3144b72b-b4f2-46da-b4b6-c5d7485f2b42&DisplayLang=en

To put it another way, in the time that it took you to compose your last message you could have tested it and answered your own question:

set xml = Server.CreateObject("Msxml2.ServerXMLHTTP")
xml.SetTimeout a, b, c, d            ' Where a, b, c and d are the appropriate values
xml.open "POST", "https://secure.authorize.net/gateway/transact.dll?" & FINK, false
xml.send
               
If xml.Status <> 200 Then Call ErrorConnecting
strRetval = xml.responseText
set xml = nothing
0
 
LVL 3

Author Comment

by:sharpnet
ID: 11784939
Thanks.  I know I could have but since it's a live site I wanted as much info as possible.  Thanks for your patience and help.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 11784972
>>I know I could have but since it's a live site I wanted as much info as possible. <<
And I would never suggest you use code in a production site without testing.  

I trust all is going well and thank for the points.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Connecting to multiple databases to create a Dashboard 5 97
JQuery on multiple lines 3 49
GitHub 1 41
Get Pop-Up Or Div Info Box From JQuery DataTable Cell in ASP 7 37
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 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/…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

752 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