Solved

ServerXMLHTTP 6.0 and HTTPS

Posted on 2013-05-21
2
5,756 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 500 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

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…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

737 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