Solved

ASP File System Object permission?

Posted on 2003-10-24
11
455 Views
Last Modified: 2010-04-17
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
%>
0
Comment
Question by:dukestaTAI
11 Comments
 
LVL 4

Expert Comment

by:Sandeepk1999
ID: 9617663
Give permissions to IUSR_XXXX in IIS Server
0
 
LVL 4

Author Comment

by:dukestaTAI
ID: 9626447
Everyone has read and execute permission on the folder I am checking.
0
 
LVL 2

Expert Comment

by:tobyphase
ID: 9628149
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
0
 
LVL 4

Author Comment

by:dukestaTAI
ID: 9628654
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.
0
 
LVL 4

Expert Comment

by:Sandeepk1999
ID: 9628933
Can you try creating a virtual directory in your IIS server to the remote folder?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 4

Author Comment

by:dukestaTAI
ID: 9628980
FSO doesn't even work locally.  Though, that may be an option once I get it to work locally.
0
 
LVL 4

Expert Comment

by:Sandeepk1999
ID: 9629651
But on your first comment that it worked when you logged in locally. Can you tell what is the exact error you are getting?
0
 
LVL 4

Author Comment

by:dukestaTAI
ID: 9629833
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.



0
 
LVL 4

Accepted Solution

by:
Sandeepk1999 earned 50 total points
ID: 9630371
Try changing your website authentication to anonymous account and check if it works.
0
 

Expert Comment

by:ReverseAngle
ID: 9764882
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.

http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q295/3/75.asp&NoWebContent=1
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Purpose To explain how to place a textual stamp on a PDF document.  This is commonly referred to as an annotation, or possibly a watermark, but a watermark is generally different in that it is somewhat translucent.  Watermark’s may be text or graph…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now