[thelist] File System Object not working on IIS

Casey Crookston casey at thecrookstons.com
Thu Jul 29 21:46:43 CDT 2004


> ----- Original Message -----
> From: "Casey Crookston" <casey at thecrookstons.com>
> Subject: [thelist] File System Object not working on IIS
>
>
>  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"

Okay, now I'm getting this error:

Error Type:
Microsoft VBScript runtime (0x800A0046)
Permission denied
/content_manage/text_edit/display_message.asp, line 67

Line 67 being:
OutStream=FileObj.OpenTextFile(Server.MapPath("includes/photo1.html"),2,
TRUE)

So, now I must admit that I don't know how to change the permissions on that
file.  :-(

Casey





More information about the thelist mailing list