Here is the error message: Could not find a part of the path 'S:\00000000\40.tif'.
On our web server, there is an S drive mapped to a folder on another PC on the network. The app I create works fine on my PC and on the web server when the path is set to a local directory but will not work when passing the path to a mapped drive. The shared permission is set to Everyone and Full Control.
Here's my code:
Dim strFile As String = "S:\00000000\40.tif"
Dim _stream As System.IO.Stream = New System.IO.FileStream(strFile, System.IO.FileMode.Open)
Dim _bmp As New Bitmap(_stream)
Context.Response.ContentType = "image/gif"
_bmp.Save(Context.Response.OutputStream, System.Drawing.Imaging.ImageFormat.Gif)
_bmp.Dispose()
_stream.Close()
I've looked on previous posts but haven't found one that matches my situation. Any help is appreciated.
Thanks.
On our web server, there is an S drive mapped to a folder on another PC on the network. The app I create works fine on my PC and on the web server when the path is set to a local directory but will not work when passing the path to a mapped drive. The shared permission is set to Everyone and Full Control.
Here's my code:
Dim strFile As String = "S:\00000000\40.tif"
Dim _stream As System.IO.Stream = New System.IO.FileStream(strFile, System.IO.FileMode.Open)
Dim _bmp As New Bitmap(_stream)
Context.Response.ContentType = "image/gif"
_bmp.Save(Context.Response.OutputStream, System.Drawing.Imaging.ImageFormat.Gif)
_bmp.Dispose()
_stream.Close()
I've looked on previous posts but haven't found one that matches my situation. Any help is appreciated.
Thanks.