[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2308
  • Last Modified:

xml http msxml3.dll error '800c0005'

what is that error and what is my problem here?

<%
Dim objXMLHTTP, URL, params
URL = "http://00.000.00.00:0000"
(i masked the ip and the porst)
 
Set objXMLHTTP = Server.CreateObject("MSXML2.XMLHTTP")
 
objXMLHTTP.Open "POST", URL, False
objXMLHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded;charset=US-ASCII" 
objXMLHTTP.setRequestHeader "Content-Location", "http://aaa.aaaa.co.uk"
 
params = "x-up-ntfn-channel=push&x-up-ntfn-ttl=0&x-up-subno=5678991584-8654131_wap.bolo.com"
params = params & "&x-up-upnotifyp-version=upnotifyp/3.0"
 
objXMLHTTP.Send params
 
Set objXMLHTTP = Nothing 
%>

Open in new window

0
sasha85
Asked:
sasha85
  • 12
  • 7
  • 5
11 Solutions
 
hieloCommented:
See if the attaached function solves the issue. You would use it as follows:

mydata = getPage("http://www.site.com:81","batch=" & Server.URLEncode(IDS) )

Notice how I am encoding the IDS variable prior to passing it to the getPage function. Also make sure you are able to get to the url in question by using a regular browser. If the page is offline it will not work.
function getPage(sourceURL,params)
  set xmlServerHttp = server.createObject("MSXML2.ServerXMLHTTP.4.0")
  xmlServerHttp.Open "POST", sourceURL, False  xmlServerHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
  xmlServerHttp.send params
  getPage = xmlServerHttp.responsetext
  Set xmlServerHttp = Nothing
end function

Open in new window

0
 
_Stilgar_Commented:
I think you're using a wrong version for your server.

See:
http://www.dbforums.com/showthread.php?t=979588
http://forums.aspfree.com/asp-development-5/msxml3-dll-error-800c0005t-68433.html

Try hielo's code or the snippets from the URLs I provided in your other post.

Stilgar.
0
 
sasha85Author Commented:
hielo,
i understand that all my variables need to send by IDS?
if so, how i need to gether all my variables on my asp code(how i can send them as IDS)?
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
_Stilgar_Commented:
Try this:

For each f in request.form
   IDS = IDS & "&"&f&"=" & request.form(f)
Next
0
 
sasha85Author Commented:
rhose are my variables:
POST /ntfn/add HTTP/1.0
Content-Location: http://www.soltek.com
Content-Length: 100
x-up-upnotifyp-version: upnotifyp/3.0
x-up-subno: 123456789_yuc3.vont.com
x-up-ntfn-ttl: 0
x-up-ntfn-channel: push
Content-Type: application/x-up-alert;charset=US-ASCII

Type=alert&Title=anything&URL=abc.gogo5.com

why do i need a form?
0
 
_Stilgar_Commented:
Then do IDS = "Type=alert&Title=anything&URL="& Server.URLEncode("abc.gogo5.com")
0
 
sasha85Author Commented:
i am lost...there are to many versions of this mistaken xml:)
can you paste it please inside one of the examples of my xml?
0
 
_Stilgar_Commented:
I think I provided you with everything you need to get started and finished, in 2 separate posts; I'm sorry but I'm not going to work this out with you step by step...
0
 
sasha85Author Commented:
stilgar, i read all your links...2 days now i am testing a lot of codes and no one works...
i pasted a real code there that was not working...instead of helping understanding i got a lots of links and diffrent comments from you but no one was about my code...and was not helping me understand my mistake...
hielo gave me an exmaple for a function, and i asked how i can send all the 10 variables to to this function.-you wrote 2 comments about using IDS with no real variables...
like
x-up-subno: 123456789_yuc3.vont.com
x-up-ntfn-ttl: 0
x-up-ntfn-channel: push

i realy cannot understand how i can learn anything from this.
i made a mistake in my code and asked for help,not step by step help, but a help fixing the mistake in my code.

thank you:)
0
 
hieloCommented:
>>i understand that all my variables need to send by IDS?
NO. You understood wrong. Ultimately if IDS contains "Hello World" thatn what you are really passing to
getData is:
mydata = getPage("http://www.site.com:81","batch=Hello%20World")

See code below for your case
Dim params
params = "x-up-subno=" & Server.URLEncode(123456789_yuc3.vont.com) & "&x-up-ntfn-ttl=0&x-up-ntfn-channel=push"
 
mydata = getPage("http://www.site.com:81",params)

Open in new window

0
 
sasha85Author Commented:
ok now i understand , but what will extualyy send the data to the other server?
as i understand it will just enter into "mydata"
0
 
_Stilgar_Commented:
@hielo - lets concentrate this issue at http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/ASP/Q_23148781.html. I already solved his parameters issue there.
0
 
_Stilgar_Commented:
sasha no the return value of the function will get into mydata. getPage() send the data stored in params to the other URL in this line:

xmlServerHttp.send params

Stilgar.
0
 
sasha85Author Commented:
aa ok:)
0
 
sasha85Author Commented:
i get
msxml4.dll error '80072efd'

A connection with the server could not be established


when i used
& Server.URLEncode(123456789_yuc3.vont.com) &
i got syntax error pointing on _
Dim params,mydata
params = "x-up-subno=178998884-5168881_kolop.com&x-up-ntfn-ttl=0&x-up-ntfn-channel=push"
 
mydata = getPage("http://00.000.000.00:000",params)
 
 
function getPage(sourceURL,params)
  set xmlServerHttp = server.createObject("MSXML2.ServerXMLHTTP.4.0")
  xmlServerHttp.Open "POST", sourceURL, False  
  xmlServerHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
  xmlServerHttp.send params
  getPage = xmlServerHttp.responsetext
  Set xmlServerHttp = Nothing
end function

Open in new window

0
 
_Stilgar_Commented:
Doh...

& Server.URLEncode("123456789_yuc3.vont.com") &

I thought the "x-up..." vars are not for the querystring but for the HTTP headers? I think we're going in reverse...

I gave you all the tools you need in order to handle the "A connection with the server could not be established" error in the other thread.

Stilgar.
0
 
sasha85Author Commented:
i know that those are headers...i followed hielo's code...
0
 
sasha85Author Commented:
i would go that way, right?:)

Dim params,mydata
params = "Type=alert&Title=anything&URL=http://gfg.dgf.com"
 
mydata = getPage("http://00.000.000.00:0000",params)


function getPage(sourceURL,params)
  set xmlServerHttp = server.createObject("MSXML2.ServerXMLHTTP.4.0")
  xmlServerHttp.Open "POST", sourceURL, False  
 xmlServerHttp.setRequestHeader "Content-Type", "application/x-up-alert;charset=US-ASCII"
 xmlServerHttp.setRequestHeader "Content-Location", "http://tgd.dtgfg.com"
 xmlServerHttp.setRequestHeader "Content-Length", "25"
 xmlServerHttp.setRequestHeader "x-up-upnotifyp-version", "upnotifyp/3.0"
 xmlServerHttp.setRequestHeader "x-up-subno", "455461584-11545431_kolp.com"
 xmlServerHttp.setRequestHeader "x-up-ntfn-ttl", "0"
 xmlServerHttp.setRequestHeader "x-up-ntfn-channel", "push"
  xmlServerHttp.send params
  getPage = xmlServerHttp.responsetext
  Set xmlServerHttp = Nothing
end function
0
 
sasha85Author Commented:
msxml4.dll error '80072efd'

A connection with the server could not be established
0
 
hieloCommented:
Sasha, not all characters are sent "literally" on the querystring. For example, if you open  a browser and type:
http://www.yoursite.com/default.asp?test=Hello World

(Notice the space between Hello and Word), the browser will see that space and use it's Hexadecimal representation instead. So, before sending the request, it will translate it to:
http://www.yoursite.com/default.asp?test=Hello%20World

The browser is programmed to look for those "illegal" characters and encode them with their Hexadecimal representation. You are NOT using a browser to communicate from server to server. You are using your own script. Think of your script as being YOUR custom made mini browser (with no graphic support). This means that YOU need to detect the "illegal" characters and encode them. That's the poing of using Server.URLEncode(). I am not about to list all the "illegal" characters for you because Server.URLEncode() already knows what characters are illegal and when you pass it a string, it will encode the illegal characters and return the encoded string. Notice what I said: "It takes a string"! Above you said:
>>when i used & Server.URLEncode(123456789_yuc3.vont.com) &
The way you supplied 123456789_yuc3.vont.com is not interpreted as a string. That should have been:
Server.URLEncode("123456789_yuc3.vont.com"), as pointed out by _Stilgar_.

Also this:
>>xmlServerHttp.setRequestHeader "Content-Length", "25"
does not make sense. The content length should be the length of the information you are sending. In this case it should be:
xmlServerHttp.setRequestHeader "Content-Length", Len(params)

Lastly, "A connection with the server could not be established" is crystal clear. You are not providing the correct domain or ip or port or the web server is refusing connection from your host. If you are using a domain, then the DNS may not be returning the correct IP. The function I posted previously works. I have used it and it has solved the issue for other here at EE as well. So, either you are not using it correctly or there is some sort of network issue on your end.

My advice, take it one step at a time. I see you are adding ton's of custom headers. Take the original function I posted and send some parameters to some test script on the remote server, but do not change the function I posted. Use it as is. The being that you need to first see if the "working" script that I posted actually reaches the server you are trying to communicate with. If so, then the issue may be with the custom headers you are adding. Otherwise, you are not using it correctly or like I said, there's an issue on your network.
0
 
sasha85Author Commented:
i think the problem to th not sending issue is the other server...i will need to check tommorow that issue cause may be all those codes was right
0
 
hieloCommented:
All you need to do is type the url you are trying to connect to on a browser and if no response is received, then the issue is the server. So, just type, http://ip:port on a browser and see if the server gives you the correct page.
0
 
sasha85Author Commented:
i am sending this and get no error, does it means that the connection with the remote server is fine?

<%

Dim params,mydata
params = "Type=alert&Title=anything&URL=http://opo.soltek.com"
 
mydata = getPage("http://00.000.000.00:4445",params)


function getPage(sourceURL,params)
  set xmlServerHttp = server.createObject("MSXML2.ServerXMLHTTP.4.0")
  xmlServerHttp.Open "POST", sourceURL, False  

  Set xmlServerHttp = Nothing
end function



%>
0
 
hieloCommented:
Well, examine the result:
mydata = getPage("http://00.000.000.00:4445",params)
Response.Write "Data Received: " & mydata
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 12
  • 7
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now