Author: jgostom | Posted on: 8/6/2009 8:01:04 AM | Views : 444

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 Studio. But when I run it from my local Web server or fro ...

Go to the complete details ...