IIS + .Net 2.0 + Upload : temporary files disappears

G

Guest

Hello,

I am developping a web site in ASP.NET 2.0
I try to do an upload with an asp:fileupload component.
During my upload, I create a thread that reads the posted file and writes it
to another one.
I use a binaryreader to read and a filestream to write.
I am alone connected on my site and I have an ObjectDisposedException during
the first read of my binaryreader.
- If I do the same thing not in a thread, it works perfectly.
- If my code is in a thread I have this exception.
- If I place my code in a thread BUT I start my site with the internal web
server of VS Net 2005, it works!!

So I investigated and I saw that just before calling the start method of my
thread, I have a temporary file created in :
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\AppName\7f6dd88d\8cb3e2bc\uploads\ns_dc34cq.post"
This file corresponds exactly of the file of the basestream of the
InputStream.

When I enter in my thread (on the first line), this file has been removed!
So I understand the exception.

But :
- Why this file disappears if I put my code in a thread with IIS 5 ?
- Why this file doesn't disappear if I put my code in a thread with the
internal web serveur ?
- Why this file doesn't disappear if I don't put my code in a thread with
IIS 5 or the internal web serveur ?

I want to work with IIS 5 and a thread ;-(

Thanks in advance.
 

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,755
Messages
2,569,537
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top