This project is read-only.

Tmp File

Aug 18, 2008 at 3:27 PM
I've bee using the dotNet HttpListener object, and have noticed that it creates a .tmp file in C:\Windows\Temp. Is it possible to prevent this file from being created (with this project)?
Aug 19, 2008 at 7:11 AM
U mean our httplister or the one that comes with the .Net framework?
Aug 20, 2008 at 2:51 PM
Edited Aug 20, 2008 at 2:52 PM
Either way, but if it will get me an answer, let's talk about yours (I just noticed that I did specify "with this project" in my original post).
Aug 20, 2008 at 5:42 PM
The only time our framework creates temp files are when a file have been uploaded in a http form. But those files are stored in the internet temporary cache folder and removed when handled.
Our http listener do not write to C:\windows\temp.
Aug 21, 2008 at 3:47 PM
Using the standard .Net HttpListener, we're setting up a listener in our code and then making a request (to stream a file) to that listener. When the streaming starts, a temporary file is created in the C:\Windows\temp folder. Are you saying that your listener won't do that?  Beyond that (and using your webserver code), if we specify the headers needed to disable caching, will that prevent the cache file from being created?

Our goal is to not have a temporary file of any kind.

Aug 21, 2008 at 4:06 PM
Our http listener is not built upon the .Net http listener, it's built using a standard TcpListener.

It's the Multipart decoder (the decoder that is used to decode HTTP forms that contain files) that writes to the Environment.SpecialFolder.InternetCache folder.
The HttpServer will add all built in form decoders if none have been added. If you manually add all decoders but the MultipartDecoder you should be fine.

The only time the multipart will be used is if you POST the file with content-type multipart/form-data (