473,387 Members | 1,455 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

File Upload Issue

Our application uploads a file to go through some parsing. Towards the end
of the process, the application moves the file from the 'processing' folder
to an archive location. However, at times this move (a moveto) fails because
the file is in use by another process (we receive a System.IO.IOException).
This DOES NOT happen on every upload. Using the FileMon tool from
SysInternals, I viewed the process activity on any file dropped into the
processing folder. I found the w3wp.exe process (this is a Windows 2003
server) working on the uploaded file. Below are the last two event captures
for a single uploaded file.

1:01:20 PM w3wp.exe:2116 READ
D:\AT.File\AT.BatchWatchFiles\WatchDogDrop\Test Batch
File-3381829280.00969.csv SUCCESS Offset: 0 Length: 4096
1:06:06 PM w3wp.exe:2116 CLOSE
D:\AT.File\AT.BatchWatchFiles\WatchDogDrop\Test Batch
File-3381829280.00969.csv SUCCESS

As you can see, I have the last read statement (there is plenty more before
this read) and the close statement both from w3wp.exe. There is over 4
minutes between the two. However, I have seen the CLOSE execute within the
same second of the last read. Through my testing, the 4 minute delay is
unusally - any delay is in the 30 to 45 second range.

Is this normal processing for the Asp.Net file upload. Why does the CLOSE
occur right after the read on most uploads but for a few uploads the CLOSE
takes up to 4 minutes to execute? Do I need to check if there is any other
process or activity that has the file locked?

Thanks
Mar 2 '07 #1
1 1437
Are you sure you closing file yourself?
do not rely ongarbage collector. Always close it. Even if exception has
happened you still must close.

something like

try
{
open file......
......Do the Dew....
}
finally
{
close file
}

George

"Robert Strickland" <bs*********@comporium.netwrote in message
news:eR**************@TK2MSFTNGP03.phx.gbl...
Our application uploads a file to go through some parsing. Towards the end
of the process, the application moves the file from the 'processing'
folder to an archive location. However, at times this move (a moveto)
fails because the file is in use by another process (we receive a
System.IO.IOException). This DOES NOT happen on every upload. Using the
FileMon tool from SysInternals, I viewed the process activity on any file
dropped into the processing folder. I found the w3wp.exe process (this is
a Windows 2003 server) working on the uploaded file. Below are the last
two event captures for a single uploaded file.

1:01:20 PM w3wp.exe:2116 READ
D:\AT.File\AT.BatchWatchFiles\WatchDogDrop\Test Batch
File-3381829280.00969.csv SUCCESS Offset: 0 Length: 4096
1:06:06 PM w3wp.exe:2116 CLOSE
D:\AT.File\AT.BatchWatchFiles\WatchDogDrop\Test Batch
File-3381829280.00969.csv SUCCESS

As you can see, I have the last read statement (there is plenty more
before this read) and the close statement both from w3wp.exe. There is
over 4 minutes between the two. However, I have seen the CLOSE execute
within the same second of the last read. Through my testing, the 4 minute
delay is unusally - any delay is in the 30 to 45 second range.

Is this normal processing for the Asp.Net file upload. Why does the CLOSE
occur right after the read on most uploads but for a few uploads the CLOSE
takes up to 4 minutes to execute? Do I need to check if there is any other
process or activity that has the file locked?

Thanks

Mar 2 '07 #2

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

Similar topics

20
by: CHIN | last post by:
Hi all.. here s my problem ( maybe some of you saw me on other groups, but i cant find the solution !! ) I have to upload a file to an external site, so, i made a .vbs file , that logins to...
14
by: Al Smith | last post by:
I need help in implementing proper error handling. I am trying to upload a file based on the sample code below. The code works well except if the file selected is too big. I do know about the...
4
by: Manu | last post by:
I want my user to upload a file to the site. Let us say a word file to be saved in the database for other users of the site to use. How can this be done? Is there a web control for that?
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...
3
by: Mike Kelly | last post by:
Hi. I've built a page using standard ASP.NET 2.0 features and when I upload a large file (>20MB) to our intranet server, I get a paltry 100KB/s on our 100Mb/s LAN. Simply copying the file, I get...
8
by: mpar612 | last post by:
Hello, I am a newbie to PHP, MySQL. I am trying to create a basic file upload form. I want to get that working and then I want to integrate that into a form that will rename the file and save...
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...
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....
4
by: henribaeyens | last post by:
Hello, I have this question that hopefully some of you guys can answer. So I use the usual mechanism: display form, enter data, browse for file, validate, upload if no errors. Well, something...
2
by: darrel | last post by:
I've written a file-upload application in VB.net. A web form with a FILE field that then uploads the file. Pretty simple. I'm getting a report from the customer that one particular user can't...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.