Can't save file...

P

Philipp Lenssen

On my server (IIS5 on localhost on WinXP, latest Win-patches etc.) I
can't seem to save a simple file. All rights are set and IIS-user is
administrator. My server crashes. Have to restart the server/ wait some
minutes. There's no error message, just a continuous loading bar in my
IExplorer...
That's my function below, and I'm really sure I used it on other
systems before and it worked.

public sub setFileText(byVal relativePath, byVal fileText)
const overwrite = true
dim fileSystem
dim fileHandle
dim absolutePath

absolutePath = server.mapPath(relativePath)

set fileSystem = server.Createobject("Scripting.FileSystemObject")
set fileHandle = fileSystem.createTextFile(absolutePath,
_overwrite, 0)
fileHandle.write fileText
fileHandle.close

set fileHandle = nothing
set fileSystem = nothing
end sub

(... some error handling removed for clarity ... it still doesn't
work... and no error message either.)

BTW I can use XML object's file-saving methods so it can't really be a
permission-issue...
Anyone got any ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top