[thelist] File System Object not working on IIS

Peter Brunone (EasyListBox.com) peter at easylistbox.com
Thu Jul 29 14:03:37 CDT 2004


   Hopefully this is a stupid question, but does the file exist in the new environment?

Original Message:
>From: "Casey Crookston" <casey at thecrookstons.com>

>I used this little bit of code back when I was running PWS on win98.  It
>used File System Objects to open and edit a text file.  I'm trying it now on
>winXP, IIS 5.1, and it hangs.  Not sure why....
>
>
>
>dim FileObj,OutStream
>
>Set FileObj=Server.CreateObject("Scripting.FileSystemObject")
>
>Set OutStream=FileObj.OpenTextFile(Server.MapPath("includes/photo1.html"),2,
>TRUE)
>
>OutStream.Write(Request.Form("strMessage"))
>
>OutStream.Close
>
>Response.Redirect"../default.asp"
>
>Thanks in advance!
>Casey





More information about the thelist mailing list