Author: jgostom | Posted on: 8/6/2009 8:39:19 AM | Views : 430

A have a problem of accessing a file on the remote server (not Web server). Here is my code:
?/APF/ is a vertual directory on the Web server asociated with the folder on the remote not Web server.
sPath = Server.MapPath("/APF/test.txt")
I also tried
sPath = "\\vcomnas2\sys\Extract\test.txt"
I also tried         
sPath = "\\vcomnas2/sys/Extract/test.txt"
If File.Exists(sPath) Then
            Response.Write("File exists <br>")
Else
            Response.Write("File not found <br>")
End If
Dim sw As New StreamReader(sPath)
Response.Write(sw.ReadToEnd() & "<br>")
sw.Close()
 This code perfectly works when I run it from Visual ...

Go to the complete details ...