I
IntraRELY
I have a loop that loops through this sub. However, I recieve an
WebException error in my try statement. "An exception occurred during a
WebClient request." This message doesnt happen when I am only looping
throught the sub once, however when I process multiple records, I recieve
this error for every record after the first one.
And the images that is downloaded does show up for all records processed. So
everything works there is just an error, that says to the contrary.
TIA,
Steve Wofford
' Create a new WebClient instance.
Dim myWebClient As New System.Net.WebClient
' Sets the default image directory
Dim checksSignatureUri As String = "http://68.106.74.63/rateQuest/images/"
' Sets the imagename used for both download and local file access
Dim checksSignatureFileName As String = "checksSignature.jpg"
' Sets download resource
Dim checksSignatureResource As String = checksSignatureUri +
checksSignatureFileName
' Sets the local resource for local app to access the downloaded file
Dim checksSignatureLocalFile As String = "C:\" + checksSignatureFileName
Try
' Downloads the file
myWebClient.DownloadFile(checksSignatureResource, checksSignatureLocalFile)
Catch ex As System.Net.WebException
MsgBox("Unexpected Error occurred with Check Signature Image from URL: " &
ex.Message.ToString())
' INSERT AN EXIT APPICATIION METHOD TO CLOST THE APP.
End Try
' Imports checksSignature.jpg 150px X 60px
Dim checksSignature As New Bitmap(checksSignatureLocalFile)
xPos = leftMargin + 450
yPos = topMargin + 120
ev.Graphics.DrawImage(checksSignature, xPos, yPos)
WebException error in my try statement. "An exception occurred during a
WebClient request." This message doesnt happen when I am only looping
throught the sub once, however when I process multiple records, I recieve
this error for every record after the first one.
And the images that is downloaded does show up for all records processed. So
everything works there is just an error, that says to the contrary.
TIA,
Steve Wofford
' Create a new WebClient instance.
Dim myWebClient As New System.Net.WebClient
' Sets the default image directory
Dim checksSignatureUri As String = "http://68.106.74.63/rateQuest/images/"
' Sets the imagename used for both download and local file access
Dim checksSignatureFileName As String = "checksSignature.jpg"
' Sets download resource
Dim checksSignatureResource As String = checksSignatureUri +
checksSignatureFileName
' Sets the local resource for local app to access the downloaded file
Dim checksSignatureLocalFile As String = "C:\" + checksSignatureFileName
Try
' Downloads the file
myWebClient.DownloadFile(checksSignatureResource, checksSignatureLocalFile)
Catch ex As System.Net.WebException
MsgBox("Unexpected Error occurred with Check Signature Image from URL: " &
ex.Message.ToString())
' INSERT AN EXIT APPICATIION METHOD TO CLOST THE APP.
End Try
' Imports checksSignature.jpg 150px X 60px
Dim checksSignature As New Bitmap(checksSignatureLocalFile)
xPos = leftMargin + 450
yPos = topMargin + 120
ev.Graphics.DrawImage(checksSignature, xPos, yPos)