Solved

Weird problem using Microsoft.XMLHTTP.  Works on all but 1 server...????

Posted on 2007-11-14
10
415 Views
Last Modified: 2012-06-27
I've got the following little chunk of code in my application...

URL = "http://www.domain.com/fmApps/ImportWebOrders.asp"                                                  
Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
      objXMLHTTP.Open "POST", URL, false
      objXMLHTTP.Send
      objXMLHTTPResponse = objXMLHTTP.responseText
Set objXMLHTTP = Nothing

This application has been in use for more than a year and has never had an issue...until today.  Suddenly I'm getting timeouts when the script hits this portion of code and tries to run the other script in the background.

When I put this code block in a script on my test servers here at home it works just fine...even using the same URL, which is the actual live web server.  However, if I run the code block on the actual live server itself I get timeouts.

Again, this suddenly started happening today after about a year's use on this server.  There have been no updates or changes to the server since this has stopped working.

Any ideas on this would be greatly appreciated.  I"m at a complete loss.
0
Comment
Question by:Andrew Angell
  • 3
  • 3
  • 2
  • +1
10 Comments
 
LVL 25

Expert Comment

by:imitchie
Comment Utility
is the page containing this code and the URL on the same domain? I think even http://domain.com  posting to http://www.domain.com may be blocked.  I don't believe XMLHttp is valid across domains
0
 
LVL 29

Expert Comment

by:Badotz
Comment Utility
>>There have been no updates or changes to the server since this has stopped working.

Famous last words...
0
 
LVL 54

Expert Comment

by:b0lsc0tt
Comment Utility
angelleye,

Do you have a On Error Resume Next line that can be commented out?  It might provide a good error message to the problem.

Some servers use other "objects" so you could try ...

Set objXMLHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")

Let me know if that line works better.  Let me know if you have any questions or need more information.

b0lsc0tt
0
 
LVL 11

Author Comment

by:Andrew Angell
Comment Utility
There is no On Error Resume next anywhere.  When I actually run the ImportWebOrders.asp page manually it works just fine.  No errors, no timeounts.  

Yes, the script being run and the page trying to run it are both on the same domain.  And to get really detailed, the site actually runs on https://www.workdomain.com and the script being run with this code just uses http://www.workdomain.com.  Again, though, it's always been this way.

The code works on my test server on both http:// and https://, posting to http://www.workdomain.com.  The code also works on my own test machines when I post to localhost, or the same domain.

The really annoying thing is that I didn't configure this web server and I don't have 100% admin access to play with it.  I double checked the server logs and there haven't been any new patches applied, no new software, no configuration changes, nothing.  It hasn't even been rebooted since the last MS update release yet this code has worked all along until today....and now works everywhere I try except for this server.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 29

Expert Comment

by:Badotz
Comment Utility
Then something, somewhere, has changed. Software doesn't stop working "just because". What do the event logs show you?
0
 
LVL 54

Expert Comment

by:b0lsc0tt
Comment Utility
Let me look at this a little more when I have some free time but your details and info help.  I am actually surprised you have it working at all if I understood you correctly.  There might be something unique about using the xmlhttp object on the server but it isn't suppose to allow cross "protocol" posting (e.g. an http page to an https page).  This is usually a security limitation.

What are the server OS's you are using in these cases?

bol
0
 
LVL 11

Accepted Solution

by:
Andrew Angell earned 0 total points
Comment Utility
Well, I went ahead and rebooted the web server and now it's all working again.  That must be what I did last time too.  Exact same routine.  Wasted the whole day and then finally just rebooted.  Usually that's the first thing I do but this is such a weird thing for a reboot to fix it seems like.

I'm running Windows Server 2003 in all cases.  But only on this one server have I ever had this problem...which has now been twice in the past year or so.  I just can't think of what the heck is causing it.  Hopefully I'll remember next time to just reboot the thing before wasting a day troubleshooting it.  
0
 
LVL 54

Expert Comment

by:b0lsc0tt
Comment Utility
Thanks for posting the solution.  Figure a reboot was needed.  That seems to be the common solution for Windows servers. :)

Let me know if you have a question or need help closing this.  Since you answered it yourself you can get your points refunded.

bol
0
 
LVL 11

Author Comment

by:Andrew Angell
Comment Utility
Yeah I've never figured out after the site re-design where to go to request question deletion..??
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

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…
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/…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

762 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

10 Experts available now in Live!

Get 1:1 Help Now