Solved

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

Posted on 2007-11-14
10
420 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
[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
  • 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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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…
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…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

738 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