Print Page | Close Window

file object

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=10539
Printed Date: 31 March 2026 at 4:17pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: file object
Posted By: kobubu
Subject: file object
Date Posted: 20 May 2004 at 12:23pm

hello there

im trying to use the object that give information about the files that there is in my drives,it shows all the files in the chosen drive but at the time to chose one of the file the computer is thinking and dont do nothing.

in the past i could have enterd but now its not working ( i have insteled alot of programs )

just to add if i wait alot of time i get a message from the explorer that too meny people is trying to acaess

 

maybe sombody have an idea what to do ?

thanks ahead

 for each fileObj in FolderObj.Files
               p_file = fileObj.Name
               p_full_path = Server.URLEncode(p_folder & "\" & p_file)
%>               <A HREF="importfile.asp?p_full_path=<%=p_full_path%>">
                   <%=FileObj.Name%>
               </A><BR>
<%          next

 




Replies:
Posted By: Semikolon
Date Posted: 20 May 2004 at 6:59pm
are you closing file connectins and seting objects to Nothing?


Posted By: kobubu
Date Posted: 21 May 2004 at 5:02am

hello

this object they dont have the metod close

but i do set them for nothing

any ideas?

thanks



Posted By: Semikolon
Date Posted: 21 May 2004 at 5:13am
do you use any other objects on the same website? like ADO and CDO?


Posted By: kobubu
Date Posted: 21 May 2004 at 5:54am

hello thanks for your interes

yes i do use this objects.

what does it mean if i use them?

thanks



Posted By: Semikolon
Date Posted: 21 May 2004 at 11:06am
do you close and reset them properly?


Posted By: kobubu
Date Posted: 21 May 2004 at 2:01pm

thanks again

yes i do close my objects,does it matter that im using DB ACCESS?

thanks ahead



Posted By: Semikolon
Date Posted: 21 May 2004 at 2:18pm
before every redirect and page end?

don't get offended by these posts, I havn't said that you write bad code or are a newbie, cause I don't know.. but this is common with most newbies, and, no offense, it looks like you are quite new to this..




try to use ONLY the FSO code to show the files, and no database connections.. if it works then, there has to be something with the Database part


Posted By: kobubu
Date Posted: 21 May 2004 at 2:28pm

hello

yes im new

how do i use fso ,to be quite hunest i dont know a lot about this subject.

thanks



Posted By: kobubu
Date Posted: 21 May 2004 at 3:53pm

hello again

here is the full source code, i dont use ADO only FileSystemObject

hope that it will help t find the problem

thanks

 

<%
if isAdmin then

    set fsObject = Server.CreateObject("Scripting.FileSystemObject")
   
     p_drive = Request.querystring("p_drive")

     if p_drive = "" then
%>
          <H1>Choose a Drive</H1>

<%          for each driveObj in fsObject.Drives
%>              
<A HREF="importstart.asp?p_drive=<%Response.Write driveObj.DriveLetter%>">

              <%=driveObj.driveLetter%>
               </A><BR>
<%          next
     else
%>
         <h1H1>Choose a Directory</h1H1>
          <a href<A HREF="importstart.asp">Top Level</a></A><P>
    
<%          set driveObj = fsObject.getDrive(p_drive)

             p_folder = Request.querystring("p_folder")
          if p_folder = "" then
               set FolderObj = driveObj.RootFolder
          else
               set FolderObj = fsObject.getFolder(p_folder)
          end if

%>          <h3>Folders</h3>

<%          for each subFolderObj in FolderObj.subFolders
               p_subFolder = Server.URLEncode(subFolderObj.Path)
%>         
<A HREF="importstart.asp?p_drive=<%    & nbsp;         & nbsp; Response.Write p_drive%>&p_folder=<%      ;           ; Response.Write p_subFolder%>">
                 <%=subFolderObj.path%>
           </A><BR>
<%          next

%>          <h3>Files</h3>

<%          for each fileObj in FolderObj.Files
               p_file = fileObj.Name
               p_full_path = Server.URLEncode(p_folder & "\" & p_file)
%>               <A HREF="importfile.asp?p_full_path=<%=p_full_path%>">
                   <%=FileObj.Name%>
               </A><BR>
<%          next
                
          set FolderObj = Nothing
          set driveObj = Nothing

     end if
       
     set fsObject = Nothing
else

    response.wResponse.Write "You do not have access to this page."

end if
%>

 

thanks



Posted By: Semikolon
Date Posted: 21 May 2004 at 5:13pm
what OS/version of IIS are you using?
do you have any antivirus software installed?
are your server available to the public?


Posted By: kobubu
Date Posted: 22 May 2004 at 4:21am

 

 

I use xp pro

i do have norton anti virus

how do i know if my server is open to the public?

thanks



Posted By: Semikolon
Date Posted: 23 May 2004 at 10:14am
try disabling norton.. Norton always f**ks up everything..

I don't think your server is open for the public as you have no idea about it.. but when you are connected to the internet it may be and some punks may find their way into it, but that is probably not the problem here now..


Posted By: kobubu
Date Posted: 24 May 2004 at 4:53am

hello again

just want to say tahanks the anti virus was making the trouble

thanks alot

 



Posted By: zMaestro
Date Posted: 24 May 2004 at 5:19am

can Norton make such a trouble? or this is a benifit for security reasons?, cuz by this way any user upload this file to a server he can see all the files on the drive.

Yes

I uploaded a file like this and i was able to see all the files and folders on the hard disk drive, like the root and program files, although some other users' folders I wasn't able to browse for secutiry permission, but i was allowed to navigate through all the other files on the drive, opening even .asp files and viewing its code.



Posted By: Semikolon
Date Posted: 24 May 2004 at 9:31am
Originally posted by zMaestro zMaestro wrote:

can Norton make such a trouble? or this is a benifit for security reasons?, cuz by this way any user upload this file to a server he can see all the files on the drive.


I'm not sure if Symantec has done this on purpose or not, but it is absolutely unnecessary..

Originally posted by zMaestro zMaestro wrote:


Yes

I uploaded a file like this and i was able to see all the files and folders on the hard disk drive, like the root and program files, although some other users' folders I wasn't able to browse for secutiry permission, but i was allowed to navigate through all the other files on the drive, opening even .asp files and viewing its code.



FSO is a security threat if permissions is incorrectly set up on the server.. but with most hosts this is not a problem..
It is possible to VIEW files in the Program files, windows etc folders, but not upload/delete (write) and it's not possible to do anything with folders with explicit permissions for selected users, like folders in the documents and settings folder and users' www/ftp folders


Posted By: Semikolon
Date Posted: 24 May 2004 at 9:35am
if you disable something called "Script Blocking" or whatever, you might be able to use bot Norton and FSO.. Not sure though, but you can try



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net