473,473 Members | 2,286 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

IIS + .Net 2.0 + Upload : temporary files disappears

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\Tem porary 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.

--
David
Jun 23 '07 #1
0 1190

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Chris | last post by:
I am having a problem with a php upload script. it will allow me to upload small files (about 1Mb) but not larger ones (less than the upload_max_filesize). Can you help diagnose what the...
3
by: Mike Walsh | last post by:
I have a problem uploading files with PHP which has me stumped! I am unable to successfully upload files. My simple test script is as follows: <?php if (count($_FILES)) { var_dump($_FILES)...
4
by: Matt Jensen | last post by:
Howdy I've got a rather strange issue occuring. I used forms based .NET authentication, although I'm also setting some session variables when people login. However, I've found when people use...
2
by: David | last post by:
I am attempting to upload files via. PHP 4.4.4. The '$_FILES' resolves to '/tmp/phpey9MpD', but when I go to the /tmp dir. I do not see any php* file. Could this be a issue with PHP or unix...
6
by: =?ISO-8859-1?Q?J=F8rn?= Dahl-Stamnes | last post by:
I have a strange problem when uploading a PDF document to a web-server. When I try this to a web-server running Apache 2 on a FC 4, it fails. Firefox says that the document contain no data. If I...
3
by: dreamznatcher | last post by:
Hello, I found a script here: http://www.webtoolkit.info/ajax-file-upload.html which supposedly allows you to upload files using AJAX (I'm not an expert). The site claims it's the best way to...
4
by: Tony B | last post by:
I've moved an existing site (which I didn't write) from a apache/php/mysql host under windows to a linux apache/php/mysql host. I've sorted out most problems except one. There is an upload...
0
by: Tim Payne | last post by:
I have an odd permissions issue with uploading files to a windows 2003 server. I have a reasonably unusual setup. We have a php website, running through IIS that was written to use mod_rewrite....
5
by: kailashchandra | last post by:
I am trying to upload a file in php,but it gives me error msg please Help me? My Code is like below:- i have one php file named upload.php and i have another html file named upload.html and...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.