Wrox Programmer Forums
|
Classic ASP Components Discussions specific to components in ASP 3.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 17th, 2003, 11:40 AM
Authorized User
 
Join Date: Jun 2003
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default FileSystemObject


Hello,

i'm trying to open files in a loop and i get permission denied error!

On the server the IUSR account has (Read&Execute + List Folder + Read )permissions (NTFS). IIS is set to use anonymous authentication.

I've checked twice that the correct path is passed to function.
Here is the beginning of the function :

Code:
Function GetContent(dPath) 
    Dim Path, objFSO, objStream, strFile
    Path = Server.MapPath(dPath)

    Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
    Set objStream = objFSO.OpenTextFile(Path,ForReading,False,0)
The error comes at the last line here over.

Does I need write permission to open a file in ForReading mode?
Whats wrong?
 
Old September 24th, 2003, 01:23 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 171
Thanks: 0
Thanked 1 Time in 1 Post
Default

Try changing
(Path,ForReading,False,0)
to
(Path,ForReading,False)
 Let me know what happens.


 
Old October 15th, 2003, 06:50 AM
Authorized User
 
Join Date: Jun 2003
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,

the problem here was that the administrator didn't set the right password for the IUSR...!
He droves me mad..!

Sorry for the delayed answer, but I was so stressed that I've forgot this post
Have Fun
dikkjo





Similar Threads
Thread Thread Starter Forum Replies Last Post
FileSystemObject not available mega Classic ASP Professional 1 June 19th, 2006 10:25 AM
Need Help about FileSystemObject vbpratap VB.NET 0 March 3rd, 2006 06:40 AM
Using the FileSystemObject malhyp Dreamweaver (all versions) 1 October 2nd, 2005 07:00 AM
I need help with FileSystemObject ... PLEASE xanderxvr Classic ASP Professional 0 January 31st, 2005 02:56 AM
FileSystemObject Gennady Classic ASP Components 6 June 17th, 2003 08:16 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.