jitganguly
asked on
Read external secure site
I need to read and download some files from an external site. Meaning right now they go to that site ( a finanical secure web site) with their userid, password and their screen has list of files (csv,pdf etc.) they click on it and download.
I am trying to automate this process. Tried with XMLHTTP, but probably security will not let me in.
<%
Response.Buffer = false
Dim objXMLHTTP, xml
Set xml = Server.CreateObject("Micro soft.XMLHT TP")
xml.Open "GET", "https://somesecuresite.com/acweb/hou-actuate-prd/__login", False, "myid", "mypass"
xml.Send
Response.ContentType = "text/xml"
Response.Write xml.responseText
Set xml = Nothing
%>
This doesn't work and returns a 401
Any suggestions ?
When I manually go to that site it generates some querystring characters with a successful login just like hotmail.
My question is : how do I read and download and attachment from a hotmail kind of system
I am trying to automate this process. Tried with XMLHTTP, but probably security will not let me in.
<%
Response.Buffer = false
Dim objXMLHTTP, xml
Set xml = Server.CreateObject("Micro
xml.Open "GET", "https://somesecuresite.com/acweb/hou-actuate-prd/__login", False, "myid", "mypass"
xml.Send
Response.ContentType = "text/xml"
Response.Write xml.responseText
Set xml = Nothing
%>
This doesn't work and returns a 401
Any suggestions ?
When I manually go to that site it generates some querystring characters with a successful login just like hotmail.
My question is : how do I read and download and attachment from a hotmail kind of system
ASKER
Apollois,
It failing in Send statemenet and probably due to its not recognizing my company proxy.
Whenever I go to a external site, it reads proxy information from my browser. SInce I am trying to do it externally (through ASP program), its not recognizng its me.
So I have to somehow pass my credentatial whenever I want to aceesse a external internet site.
The error msgs is
Error 401
FW-1 at cpfw2ny: Unauthorized to access the document.
Authorization is needed for FW-1.
The authentication required by FW-1 for lizt is: password.
Reason for failure of last attempt: Access denied - wrong user name or password
FYI - lizt is the query string I am passing
Question : How do I bypass proxy ? or send my credential through the URL ?
It failing in Send statemenet and probably due to its not recognizing my company proxy.
Whenever I go to a external site, it reads proxy information from my browser. SInce I am trying to do it externally (through ASP program), its not recognizng its me.
So I have to somehow pass my credentatial whenever I want to aceesse a external internet site.
The error msgs is
Error 401
FW-1 at cpfw2ny: Unauthorized to access the document.
Authorization is needed for FW-1.
The authentication required by FW-1 for lizt is: password.
Reason for failure of last attempt: Access denied - wrong user name or password
FYI - lizt is the query string I am passing
Question : How do I bypass proxy ? or send my credential through the URL ?
jitganguly,
Check this out.
Proxy Configuration Utility Must Be Run for ServerXMLHTTP to Work
http://support.microsoft.com/default.aspx?scid=kb;EN-US;289481
Download Proxycfg.Exe From Following MSDN Web Site At:
http://msdn.microsoft.com/code/sample.asp?url=/msdn-files/027/001/468/msdncompositedoc.xml
Best Regards,
apollois
Check this out.
Proxy Configuration Utility Must Be Run for ServerXMLHTTP to Work
http://support.microsoft.com/default.aspx?scid=kb;EN-US;289481
Download Proxycfg.Exe From Following MSDN Web Site At:
http://msdn.microsoft.com/code/sample.asp?url=/msdn-files/027/001/468/msdncompositedoc.xml
Best Regards,
apollois
Are you sure one request is enouth, most of the systems redirect you, and you won't be able to see it from your browser.
Try to use this ASP from home with out any proxy installed - according to you it should work
If system require password/login, you need to login first - i.e. send something to some page, grab cookie and Session ID
and analyze a response, and when make another request for the actual file.
and this another request - in the headers you should attach cookie , sessionID and so on form the prev. page - in this case everything will work like you are using your browser.
You can also use bridge, another asp file on another computer, that takes your link, grab response and send it to your asp AS-IS if direct connection is not possible.
And, in my programs i'm using slightly different format,
Set http = server.CreateObject("Micro soft.XmlHt tp")
http.open "GET", url, False
http.send ""
body =http.responseText
I'm not sure why you assume that you should send password in xml.Open "GET", statement in 99% of servers - you should open login page, fill out form and submit it.
(via ASP program)
Good luck
Try to use this ASP from home with out any proxy installed - according to you it should work
If system require password/login, you need to login first - i.e. send something to some page, grab cookie and Session ID
and analyze a response, and when make another request for the actual file.
and this another request - in the headers you should attach cookie , sessionID and so on form the prev. page - in this case everything will work like you are using your browser.
You can also use bridge, another asp file on another computer, that takes your link, grab response and send it to your asp AS-IS if direct connection is not possible.
And, in my programs i'm using slightly different format,
Set http = server.CreateObject("Micro
http.open "GET", url, False
http.send ""
body =http.responseText
I'm not sure why you assume that you should send password in xml.Open "GET", statement in 99% of servers - you should open login page, fill out form and submit it.
(via ASP program)
Good luck
hi
this problem is interesting. apollois is probably going right way. i think, you can also use wmi/wsh to login to another machine (if the user you are impersonating has an account there). have a look at this
http://www.winscripter.com/wsh/internet/hotmail.asp
this problem is interesting. apollois is probably going right way. i think, you can also use wmi/wsh to login to another machine (if the user you are impersonating has an account there). have a look at this
http://www.winscripter.com/wsh/internet/hotmail.asp
ASKER
ok. Tried with proxycfg. But it says no user name specified.
Is there any way I set up the user id while setting proxycfg ?
Is there any way I set up the user id while setting proxycfg ?
ASKER
Guys
Can I ask CS to delete this thread and refund my points ?
Can I ask CS to delete this thread and refund my points ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>>>This doesn't work and returns a 401
please post:
1. The complete error message
2. The line# of the error
3. The corresponding line of code, and previous 5 lines
Best Regards,
>apollois<