Re: problem using FileSystemObject

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Aaron [SQL Server MVP] (ten.xoc_at_dnartreb.noraa)
Date: 08/25/04


Date: Wed, 25 Aug 2004 09:48:28 -0400

http://www.aspfaq.com/2180

-- 
http://www.aspfaq.com/
(Reverse address to reply.)
"gadya" <gadya@discussions.microsoft.com> wrote in message
news:9F751265-4FAE-4416-B574-10D875AC3775@microsoft.com...
> I am learning to use ASP on IIS 6 under Windows XP.
> When I came to the FileSystemObject I found IIS hangs on OpenTextFile.
> (no problem when scripting on the Client!)
> I couldn't find anything on Technet.
>
> I find that I can use folderExists
>  but not getFolder
>
> I can use GetFileName
>  but not GetFile
>  and not OpenTextFile
>
> (I've tried using Fat32 and NTFS and different drive letters but to no
avail.
> I've turned off Norton antivirus and set my IE security settings to Low.)
>
> I'm using the Script Debugger and executing one command at a time and it
> hangs consistently on binding to a file.
> I then have to reboot my PC in order to be able to use IIS.
> ------------------------
>
> This works:
> <SCRIPT LANGUAGE=VBScript RUNAT=Server>
>      Stop
>      Set fso = Server.CreateObject("Scripting.FileSystemObject")
>   If fso.FolderExists("H:\Downloads") then
>   Response.Write("<br>There is a folder named \Downloads")
>   End if
>
>  fln = fso.GetFileName("H:\Downloads\test.txt")
>  Response.Write(fln & "<br>")
>
> </SCRIPT>
>
> (The Stop is to activate the Debugger)
> ---------------------------------------
>
> These don't work
> <SCRIPT LANGUAGE=VBScript RUNAT=Server>
>      Stop
>      Set fso = Server.CreateObject("Scripting.FileSystemObject")
>   If fso.FolderExists("H:\Downloads") then
>   Response.Write("<br>There is a folder named \Downloads")
>         set objFolder = fso.getFolder ("H:\Downloads")
> ' fails here
> Response.Write("<br>Have bound to folder named \Downloads")
>   End if
> </SCRIPT>
>
> <SCRIPT LANGUAGE=VBScript RUNAT=Server>
>      Stop
>      Set fso = Server.CreateObject("Scripting.FileSystemObject")
>
>      fln = fso.GetFileName("H:\Downloads\test.txt")
>      Response.Write(fln & "<br>")
>
>      set objFile =  fso.GetFile ("H:\Downloads\test.txt")
>
> ' fails here
>      Response.Write("<br>Have bound to file named test.txt")
>
> </SCRIPT>
> --------------------------------
>
> Any ideas?
>
>
> Victor
>
>


Relevant Pages

  • Re: Access Denied - UNC and FileSystemObject
    ... portion that fails (basically, I have a second script with just these ... set fso = createobject ... Error: Permission Denied ...
    (microsoft.public.scripting.vbscript)
  • Re: Object doesnt support this property or method: fso.GetFile
    ... When I came to the FileSystemObject I found IIS hangs on OpenTextFile. ... I'm using the Script Debugger and executing one command at a time and it ... ' fails here ...
    (microsoft.public.inetserver.iis)
  • Re: Can not connect to Visual Source Safe from ASP
    ... > Here is the portion of the asp pagesthat fails: ... > The same script will work fine if it was adapted and saved as a vbs ... Tom Kaminski IIS MVP ...
    (microsoft.public.inetserver.asp.general)
  • Re: Secured IIS Project - IIS 4.0 Secure Script
    ... Secured IIS Project - IIS 4.0 Secure Script ... Machines which were upgraded from IIS 2.0 (original NT installation), ... Remove FTP Service ...
    (NT-Bugtraq)
  • Re: INETINFO and ASP Trouble
    ... seeing many IIS and ASP errors in the event log, ... > Event Type: Error ... > Event Source: Service Control Manager ... IIS log failed to write entry, Script timed out. ...
    (microsoft.public.inetserver.iis)