?
Solved

ServerXMLHTTP 6.0 and HTTPS

Posted on 2013-05-21
2
Medium Priority
?
6,397 Views
Last Modified: 2013-05-21
Hello experts,

I need to reach to a XML based page and read the XML content. The XML page is accessible via HTTPS however it does not require any authentication.

Here is my code (Thanks to Padas from an earlier question):

<%
DataToSend = "id=1"
dim xmlhttp
set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP.6.0")
xmlhttp.setOption 2, 13056
xmlhttp.Open "POST","https://<Server IP Address>:<Port>/<Page Details>",false
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlhttp.send DataToSend
Response.ContentType = "text/xml"
Response.Write xmlhttp.responsexml.xml
Set xmlhttp = nothing
%>


The page provides: XML Parsing Error: no element found. (Firefox)

When I create a page with the exact XML structure and use that in my code, it works:
   Instead of this:
   xmlhttp.Open "POST","https://<Server IP Address>:<Port>/<Page Details>",false
   I use this (same XML)
   xmlhttp.Open "POST","http://localhost//test/test.asp",false

It has to be the Certificates and HTTPS which corrupts this request.

I do not have a Certificate but an Exception is already added.

How can I achieve my goal? Will 'MSXML2.ServerXMLHTTP.6.0' help me or are there any alternatives for SSL?

Thank you in advance
0
Comment
Question by:bozer
[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
2 Comments
 
LVL 15

Accepted Solution

by:
pateljitu earned 2000 total points
ID: 39185702
In your code line "xmlhttp.setOption 2, 13056" basically take care of SSL certificate and ignore the error encountered.

1. when you execute URL: "https://<Server IP Address>:<Port>/<Page Details>" do you get expected XML output.
2. Can you please make modification to the code and see the result:
<%
DataToSend = "id=1"
dim xmlhttp
set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP.6.0")
xmlhttp.setOption 2, 13056
xmlhttp.Open "POST","https://<Server IP Address>:<Port>/<Page Details>",false
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlhttp.send(DataToSend)
'Response.ContentType = "text/xml"
'Response.Write xmlhttp.responsexml.xml
Response.Write xmlhttp.Responsetext
Set xmlhttp = nothing
%>

Open in new window

0
 

Author Closing Comment

by:bozer
ID: 39186330
Thank you Pateljitu, it worked!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
#SSL #TLS #Citrix #HTTPS #PKI #Compliance #Certificate #Encryption #StoreFront #Web Interface #Citrix XenApp
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

765 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