ASP File System Object permission?
Posted on 2003-10-24
I am trying to check for a file on a remote server. Everyone has read and execute permissions to the folder and files I am trying to check. I believe the code is correct because it works when I logon to the IIS server and load the page, but not when I load the page on a computer other than the IIS server. I wonder if it is a permission thing or setting? Thanks in advance for your help. Here is my code:
<%'Check to see if photo exists
fname = rs.Fields("FirstName")
lname = rs.Fields("LastName")
set objfso = server.createobject("Scripting.FileSystemObject")
strFile = "\\taifl\common\securitas\" & lname & ", " & fname & ".JPG"
if (objfso.FileExists(strFile))=true Then %>
<a href="<%=strFile%>" target="_blank">
<img src="\\taifl\common\securitas\<%=lname%>, <%=fname%>.JPG" width="160" height="107" align="top" border="0"></a>
set objfso = nothing