Read external secure site

Posted on 2003-03-11
Medium Priority
Last Modified: 2012-05-05
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("Microsoft.XMLHTTP")

  xml.Open "GET", "https://somesecuresite.com/acweb/hou-actuate-prd/__login", False, "myid", "mypass"
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
Question by:jitganguly
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
LVL 10

Expert Comment

ID: 8114317
Hi jitganguly,

>>>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,
LVL 20

Author Comment

ID: 8114374
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 ?
LVL 10

Expert Comment

ID: 8114631

Check this out.

Proxy Configuration Utility Must Be Run for ServerXMLHTTP to Work

Download Proxycfg.Exe From Following MSDN Web Site At:

Best Regards,

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.


Expert Comment

ID: 8117033
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("Microsoft.XmlHttp")
 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

Expert Comment

ID: 8118734
 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

LVL 20

Author Comment

ID: 8121303
ok. Tried with proxycfg. But it says no user name specified.
Is there any way I set up the user id while setting proxycfg ?
LVL 20

Author Comment

ID: 8348945
Can I ask CS to delete this thread and refund my points ?

Accepted Solution

Mindphaser earned 0 total points
ID: 8367660
Points refunded and moved to PAQ

** Mindphaser - Community Support Moderator **

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

762 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