Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ServerXMLHTTP 6.0 and HTTPS

Posted on 2013-05-21
2
Medium Priority
?
6,825 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

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…
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…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

610 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