I have to automate download of files. The files are stored on a secured web site.
I normally used this method I wrote a year ago and don't have any problems:
Public Function DownloadFileSecureURL(ByVa
l pstrURL As String, _
ByVal pstrFilename As String, _
ByVal pstrOutputPath As String, _
ByVal pstrUID As String, _
ByVal pstrPWD As String, _
ByRef pexcError As Exception) As Boolean
Dim wcWebClient As WebClient = New WebClient()
'Provide username/password to credentials and assign credentials to our WebClient object
Dim ncCred As NetworkCredential = New NetworkCredential(pstrUID,
wcWebClient.Credentials = ncCred
strURL + pstrFilename, pstrOutputPath + pstrFilename)
Catch ex As Exception
pexcError = ex
: " + ex.ToString, 1)
This method is using Credentials to pass UID and Password.
I now have to download from a new site which requires me to select a check box in addition to providing UID and PWD. I have tried with my previous method, and it is not working.
I am able to use a webbrowser in an application and pass through this screen.
How do I provide required credentials in this case?
How can I use the WebBrowser to download a file without any user intervention?
This site is: https://bearprime.com/portal/home.do