[thelist] ASP + fileSystemObject + IIS5

Jason Hepi contact at hepi.fsnet.co.uk
Mon Sep 9 04:36:01 CDT 2002


Ok - I'm now using the Server.MapPath function and I've disabled "Script
Blocking" on Norton AntiVirus while testing and it works !
Everyone thanks for your help.

<tip type="Using fileSystemObject with ASP and IIS" author="Jason Hepi">

- When reading/writing/appending to a file via ASP and the fileSystemObject
make sure the 'server.mapPath()' function is used to map the file to the
Drive root.
- Give correct permissions given to IUSR_MyMachineName for the folder/file
in which you want write to.
- And if you find IIS still hanging up at line 3 (see below) - try disabling
"Script Blocking" on your virus software while testing.

1. Dim fs, newXML
2. Set fs = server.CreateObject("scripting.FileSystemObject")
3. Set newXML =
fs.CreateTextFile(server.mapPath("/dev/client/asp/xml/timetable.xml"), true)
4. newXML.write(xmlStr)
5. newXML.close
6. Set fs = Nothing

</tip>

Jason Hepi











More information about the thelist mailing list