Click here to Skip to main content
15,881,172 members
Home / Discussions / Web Development
   

Web Development

 
QuestionEnterprise Library January 2006 - GUD to new for Asp.net 2.0 application Pin
dfdf34316-Mar-07 16:13
dfdf34316-Mar-07 16:13 
QuestionWindows Server 2003 SP2 Broke My Site Pin
achimera16-Mar-07 14:09
achimera16-Mar-07 14:09 
AnswerRe: Windows Server 2003 SP2 Broke My Site Pin
kubben16-Mar-07 16:52
kubben16-Mar-07 16:52 
GeneralRe: Windows Server 2003 SP2 Broke My Site Pin
achimera16-Mar-07 19:57
achimera16-Mar-07 19:57 
GeneralRe: Windows Server 2003 SP2 Broke My Site Pin
achimera16-Mar-07 22:05
achimera16-Mar-07 22:05 
AnswerRe: Windows Server 2003 SP2 Broke My Site Pin
Guffa17-Mar-07 9:17
Guffa17-Mar-07 9:17 
GeneralRe: Windows Server 2003 SP2 Broke My Site Pin
achimera17-Mar-07 10:48
achimera17-Mar-07 10:48 
QuestionURLDownloadToFile with authentication Pin
Antosha16-Mar-07 10:57
Antosha16-Mar-07 10:57 
I am trying to write a script that can download a batch of PDF files from a site that requires users to login first. To login, I used the following code:

Dim objIE As New InternetExplorer<br />
<br />
objIE.Visible = True<br />
objIE.Navigate sURL<br />
<br />
Do<br />
  DoEvents<br />
Loop Until objIE.readyState = READYSTATE_COMPLETE And objIE.Busy = False<br />
<br />
objIE.Document.all("username").Value = sUserName<br />
objIE.Document.all("password").Value = sPassword<br />
objIE.Document.forms("loginForm").Submit<br />
<br />
objIE.Navigate somefile.pdf


I am stuck after this point.

I cannot use:

objIE.ExecWB OLECMDID_SAVEAS, OLECMDEXECOPT_DONTPROMPTUSER

because it saves the file as text with a bunch of header info and binary contents corrupted.

I tried using

URLDownloadToFile(0&, somefile.pdf, sLocalFileName, 0&, 0&)

but this doen't work either because the request is not authenticated (the request returns the login page). The server doesn't support basic authentication, by the way

I think the answer is in the first parameter of URLDownloadToFile. If I can somehow pass the reference to the Internet Explorer object, the authentication info should, in theory, carry over. I haven't been able to find anything on the Web to help me with this, however.

Any thoughts?

Any alternatives?

Thank you.

A reasonable man adapts himself to the world. An unreasonable one persists, trying to adapt the world to himself. That is why all the progress in the world depends on the unreasonable men.

QuestionBreak point in the Page Load event is not firing Pin
shyamts16-Mar-07 5:29
shyamts16-Mar-07 5:29 
AnswerRe: Break point in the Page Load event is not firing Pin
Marcus J. Smith16-Mar-07 7:36
professionalMarcus J. Smith16-Mar-07 7:36 
GeneralRe: Break point in the Page Load event is not firing Pin
shyamts17-Mar-07 19:47
shyamts17-Mar-07 19:47 
Questionsending email Pin
saltcode16-Mar-07 4:52
professionalsaltcode16-Mar-07 4:52 
AnswerRe: sending email Pin
Marcus J. Smith16-Mar-07 4:55
professionalMarcus J. Smith16-Mar-07 4:55 
AnswerRe: sending email Pin
enjoycrack16-Mar-07 4:58
enjoycrack16-Mar-07 4:58 
GeneralRe: sending email Pin
saltcode16-Mar-07 6:12
professionalsaltcode16-Mar-07 6:12 
GeneralRe: sending email Pin
Marcus J. Smith16-Mar-07 7:31
professionalMarcus J. Smith16-Mar-07 7:31 
AnswerRe: sending email Pin
Vasudevan Deepak Kumar22-Mar-07 6:20
Vasudevan Deepak Kumar22-Mar-07 6:20 
Questionvalidate textbox length Pin
jayvaishnav8216-Mar-07 2:49
jayvaishnav8216-Mar-07 2:49 
AnswerRe: validate textbox length Pin
hiral_shah16-Mar-07 3:09
hiral_shah16-Mar-07 3:09 
AnswerRe: validate textbox length Pin
Marcus J. Smith16-Mar-07 4:10
professionalMarcus J. Smith16-Mar-07 4:10 
GeneralRe: validate textbox length Pin
jayvaishnav8217-Mar-07 3:55
jayvaishnav8217-Mar-07 3:55 
AnswerRe: validate textbox length Pin
DavidNohejl16-Mar-07 14:30
DavidNohejl16-Mar-07 14:30 
QuestionConvertion Help! Pin
Illegal Operation16-Mar-07 2:06
Illegal Operation16-Mar-07 2:06 
AnswerRe: Convertion Help! Pin
RichardGrimmer16-Mar-07 2:13
RichardGrimmer16-Mar-07 2:13 
GeneralRe: Convertion Help! Pin
Illegal Operation16-Mar-07 2:42
Illegal Operation16-Mar-07 2:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.