Solved

ServerXMLHTTP 6.0 and HTTPS

Posted on 2013-05-21
2
4,816 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
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Forcing form refresh - classic ASP 7 46
Select2 jquery help 9 46
SSL checker internal 4 36
Pass through dll 2 38
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…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

759 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now