I inherited a web site that has a web page that displays images of properties for an online property/tax info. Using VB code, it searches for a main image then creates and saves smaller images for use as thumbnails. Currently it gets the images from a directory on the web server. The images are copied to the web server via a job from another server on our network. I am trying to code the page to get the images directly from the original server and having trouble doing it. Here's the code. Point of failure is indicated:
Sub Thumbnail2(ByVal file As String)
'This line will be changed once I get the lines below to work.
Dim checkfile As IO.FileInfo = New IO.FileInfo(Server.MapPath("parcelimagessmall/" & file))
If checkfile.Exists = True Then
'Dim sImagePath As String = Server.MapPath("parcelimages/" & file)
'My plan is to build a string using variables. Here it is hard coded for testing.
Dim sImagePath As String = "\\MyNetworkServer\images\1901200001.002.jpg"
'The code fails here
Dim bmp1 As New Drawing.Bitmap(sImagePath)
Dim bmp2 As New Drawing.Bitmap(300, 240, Drawing.Imaging.PixelFormat.Format24bppRgb)
Dim g As Drawing.Graphics
View Complete Post