Solved

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

Posted on 2007-11-14
10
419 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
ID: 20284724
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
ID: 20284873
>>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
ID: 20284883
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
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!

 
LVL 11

Author Comment

by:Andrew Angell
ID: 20285055
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
 
LVL 29

Expert Comment

by:Badotz
ID: 20285109
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
ID: 20285704
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
ID: 20287522
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
ID: 20287538
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
ID: 20287704
Yeah I've never figured out after the site re-design where to go to request question deletion..??
0

Featured Post

Technology Partners: 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
Server Timeout with Loop 6 59
Pass SQL to JSON. Page is in classic ASP and using Jquery 4 35
VB script help 23 30
Ajax on ASP 2 32
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

685 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