Saving dynamic text file to web server

GornHorse

Well-known member
Joined
May 27, 2003
Messages
105
Location
Australia
Hi there,

I need to save a text file that is created dynamically within the project to the web server that the project runs off. I have been having real problems with the URI thing - not being able to specify a web path as a valid file path to save to.

I have looked into the httpinputfile, but have now realised that this is not going to server my purpose (i dont think). If anyone has a hint on how to go about this, i would much appreciate it.

I have tried using system.io and just the fileopen/printline/fileclose stuff, but all seem to reject my web path.

Your quick response with this will be greatly appreciated.

Regards,
Michelle
 
Never mind..... idiot face (that would be me) decided to omit any reference to the webserver...

For those who may like to know; however, this helps...

savelocation = Server.MapPath("UpdatedDetails" & "\" & filename)

then, use the io.filestream...

dim fs as new io.filestream(savelocation, io.filemode.openorcreate)
dim sw as new io.streamwriter(fs)
sw.write(details)
sw.close


Well,
Catcha!
 
Back
Top