Could not find part of path on mapped drive

Discussion in '.NET' started by dhl365, Sep 18, 2007.

  1. dhl365


    Sep 18, 2007
    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)

    I've looked on previous posts but haven't found one that matches my situation. Any help is appreciated.

    dhl365, Sep 18, 2007
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page