ryoga75
asked on
Capture a web page under HTTPS via ASP
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 :) )
Thanks
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 :) )
Thanks
ok try this, https needs to pass certificate to the website
<%
const SXH_OPTION_SELECT_CLIENT_S SL_CERT=3
const certname="" ' certname when left blank pulls your first client certificate
Set objXmlHTTP = Server.CreateObject("Msxml 2.ServerXM LHTTP.4.0" )
objXMLhttp.SetOption(SXH_O PTION_SELE CT_CLIENT_ SSL_CERT, certname)
objXmlHTTP.Open("GET", "https://www.sitename.com", false)
objXmlHttp.setRequestHeade r("Content -Type", "application/x-www-form-ur lencoded")
objXmlHttp.Send()
Response.Write(objXmlHttp. responseTe xt)
%>
<%
const SXH_OPTION_SELECT_CLIENT_S
const certname="" ' certname when left blank pulls your first client certificate
Set objXmlHTTP = Server.CreateObject("Msxml
objXMLhttp.SetOption(SXH_O
objXmlHTTP.Open("GET", "https://www.sitename.com", false)
objXmlHttp.setRequestHeade
objXmlHttp.Send()
Response.Write(objXmlHttp.
%>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hai,
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.
http://www.alphasierrapapa.com/IisDev/Components/AspTear/
Bye
Ajai
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.
http://www.alphasierrapapa.com/IisDev/Components/AspTear/
Bye
Ajai
@ 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 :)
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 :)
ASKER
@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 :)
(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 :)
ASKER
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.
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.
@> 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
http://www.microsoft.com/downloads/details.aspx?FamilyID=3144b72b-b4f2-46da-b4b6-c5d7485f2b42&DisplayLang=en
2. you may want to send the login information (as you asked) thru the request like so
objXmlHTTP.Open("GET", "https://www.sitename.com", false, "username", password")
might be 2 things:
1. it is not installed and you need first download it from here
http://www.microsoft.com/downloads/details.aspx?FamilyID=3144b72b-b4f2-46da-b4b6-c5d7485f2b42&DisplayLang=en
2. you may want to send the login information (as you asked) thru the request like so
objXmlHTTP.Open("GET", "https://www.sitename.com", false, "username", password")
Check out this link
There is some code that will automatically accept cert's
http://weblogs.asp.net/jan/archive/2003/12/04/41154.aspx
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.
http://msdn.microsoft.com/library/d...entsecurity.asp"
http://www.codecomments.com/JScript/message447397.html