ASP File System Object permission?

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
dim objfso
dim fname
dim lname

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>

<%end if

set objfso = nothing
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Give permissions to IUSR_XXXX in IIS Server
dukestaTAIAuthor Commented:
Everyone has read and execute permission on the folder I am checking.
I assume you have Anonymous Access and Integrated Windows authentication selected in your authentication Methods for the website, and the Anonymous User account is IUSR_XXXX.

If so, the reason you can get to the files when on the webpage from the server is because it will be using integrated windows authentication. For the anonymous user account to access the network files, the anonymous user must be a DOMAIN account not a local account. Giving Everyone access to files only gives authenticated domain user access to the files, so website users must be running in an authenticated DOMAIN account

If the files were on the local server and not on the network, you would be able to get away with the IUSR_XXXX account
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

dukestaTAIAuthor Commented:
I tested FSO with IUSR account on local files and still no love.  If that were the case it should have worked when I tested it with local files.
Can you try creating a virtual directory in your IIS server to the remote folder?
dukestaTAIAuthor Commented:
FSO doesn't even work locally.  Though, that may be an option once I get it to work locally.
But on your first comment that it worked when you logged in locally. Can you tell what is the exact error you are getting?
dukestaTAIAuthor Commented:
Sorry for the confusion.

It worked when I logged on to the server locally.

When I logged on to another computer it did not check for the file on the remote server or local IIS server.

I hope this makes sense.

I did find out that the account is not being used as an anonymous account.  Maybe that is it.

Try changing your website authentication to anonymous account and check if it works.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
I have had this problem. Maybe the solution is one of the above but the one that worked for me was this:

Remove Script Blocking from Norton Antivirus.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.