Capture a web page under HTTPS via ASP

Posted on 2005-04-19
Last Modified: 2008-03-03
Hi everybody.

i have a big problems.
I need to capture all the contents of a web page under the https protocol.
Someone have an idea on how i can do it?

I'm trying to do it via XMLHTTP but everytime i got an Permission Denied error.
All ideas are accepted ( i need a good one that work :) )
Question by:ryoga75
    LVL 15

    Expert Comment

    Well I found two things that might help you,

    Check out this link

    There is some code that will automatically accept cert's

    or possibly this link

    "For security reasons, there are some limits to where you can get data using
    XMLHTTPRequest. The "Access data sources across domains" setting in Tools,
    Internet Options, Security controls the behavior."

    LVL 13

    Expert Comment

    ok try this, https needs to pass certificate to the website

    const certname=""  ' certname when left blank pulls your first client certificate

    Set objXmlHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0")
    objXMLhttp.SetOption(SXH_OPTION_SELECT_CLIENT_SSL_CERT, certname)
    objXmlHTTP.Open("GET", "", false)
    objXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")

    LVL 13

    Accepted Solution

    > Set objXmlHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0")

    this requires xml 4.0 to be installed on the server, if you don't have it I suggest to install it

    if you can't install it then change it to

    Set objXmlHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP.3.0")

    not sure though  :)
    LVL 11

    Expert Comment


    We used XMLHTTP long time back and we had many problems with this like firewall blocking, HTTPS problems and so on... Now we are using 3rd pary component called ASPTear which is doing it's work nicely. If you want to use it commercialy you can purchase or else you can use their free version. They had given full examples to use on ASP.

    Check this link.

    LVL 13

    Expert Comment

    @ We used XMLHTTP long time back and we had many problems with this like firewall blocking....

    maybe those issues were known in older versions of xmlhttp, in msxml 4.0 all these bugs have been eliminated and you don't have to worry about those issues anymore  :)
    LVL 2

    Author Comment

    @davidlars99 : i'ved installed the Msxml2.ServerXMLHTTP.4.0, i tried your code, and now i have an "Access denied" error.
    (before was a permission denied ).
    I think that it's a problems of "user" and "password" that are required, but i don't know how can i send that info.
    May you help me?

    @ajaikumarr : i'll try your solution shortly, luckly i'll have the possibility to install the component on my pc :)
    LVL 2

    Author Comment

    At the end i reached to do what i wanted with the help of the Msxml2.ServerXMLHTTP.3.0
    If @davidlars99 know and wanna let me know why with version 4.0 i retrieve an "Access Denied" ( or how to solve it ), would be good :)  ( no problem if he don't know or he can't :) )

    For the AspTear component, i tried but i got always the same error " certificate don't meet the origin site " (or something like this ).
    Thanks for your help both.
    LVL 13

    Expert Comment

    @> and wanna let me know why with version 4.0 i retrieve an "Access Denied"....

    might be 2 things:

    1. it is not installed and you need first download it from here

    2. you may want to send the login information (as you asked) thru the request like so
    objXmlHTTP.Open("GET", "", false, "username", password")

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    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…
    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…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    758 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

    11 Experts available now in Live!

    Get 1:1 Help Now