>>Bugs>>
[Fixed in 1.3.19? and 1.2.32?] Missing uploaded files
|
|
|
|
Author
|
[Fixed in 1.3.19? and 1.2.32?] Missing uploaded files
|
Phil Stapleton
Total Posts:
11
 |
Missing uploaded files
11/17/2009 9:13:35 AM
My app has now uploaded some 4000 image files (thanks, Dean) but every now and again files fail to arrive at the server.
The user can select four files into separate InputFiles. When he clicks "Next" the post occurrs.
On the server I usually get all 4 InputFiles returning true to .HasFile, but occasionally I only get 3,2,1 or even none.
I saw this post - http://www.brettle.com/ForumThreadView.aspx?thread=1049&pageindex=7 that talked about delays in processing. I can't really see that my code takes more than 60 seconds to execute, but it does have to do some synchronisation, so I suppose it could wait if other threads were processing other input requests simulataneously.
The post mentions " stateStaleAfterSeconds " - where is this, and can I update it programatically?
The post also mentions "processing process" documentation, but I'm out of my depth with EnableSessionState. Is it likely to have any untoward side effects on the rest of the app or does it just affect the page?
Most importantly, is there another explanation why images don't arrive (File name are OK - I've checked) |
<a href='www.photocompsoftware.com'>www.photocompsoftware.com</a> |
Phil Stapleton
Total Posts:
11
 |
Re: Missing uploaded files
11/17/2009 9:19:24 AM
I've just noticed that the App_Data/NeatUpload_Temp directory contains two files,
05ff5e629fb243e2921f4b7a39c4a1cd.config with zero length and
the other is also a .config but lenght 997 KB
Both are dated 2009-11-13 (4 days ago)
Other .config files seem to come and go. What are these two? |
<a href='www.photocompsoftware.com'>www.photocompsoftware.com</a> |
Dean Brettle
Total Posts:
2015
 |
Re: Missing uploaded files
11/17/2009 12:47:03 PM
The .config files in the NeatUpload_Temp dir are the files that NeatUpload has received but you haven't called MoveTo() on. Zero length files are created for InputFile controls where the user hasn't selected a file. NeatUpload attempts to remove all of the temp files associated InputFile controls when the request ends (i.e. after your page code-behind runs). It is unable to do that if either the app stops/restarts before the request finishes, or you open a stream on the file (e.g. via InputFile.FileContent) and don't call Close() on the stream.
You can't set stateStaleAfterSeconds programmatically. You set it as an attribute of the <neatUpload> element in your Web.config.
EnableSessionState only affects the availability of session state on a particular page. It would only affect the rest of your app to the degree that your app relies on a the upload page accessing/setting session state.
Is the problem reproducible? Does it only occur with particular files, or under heavy load?
How do you know the problem is occuring? Are you running observing .HasFile with a debugger or logging the values or something else? How do you know that the user is actually uploading 4 files when you are seeing less?
Also, what version of NeatUpload are you using?
Thanks, --Dean |
|
Phil Stapleton
Total Posts:
11
 |
Re: Missing uploaded files
11/18/2009 2:03:28 PM
Hi Dean
I'm using NeatUpload 1.3.12
Unfortunately, the code is running at a hosting company so I don't have access to the server. The problem has never occurred in my local test environment.
The problem is not reproducable and the load is never really heavy. I know the files are uploaded because the user says they entered them, and my web pages collects the file name using javascript and puts it in a hidden field that is read by the ASPX code behind.
The ASPX page has four entry "slots" where the user can select an image file and type in a corresponding title.
for example: "Slot 2" of the 4 entry "slots" has an InputFile called EntryFile_2 and a hidden text box called EntryPath_2 and a user-entered textBox called EntryTitle_2.
In the code behind I use findControlRecursive to get the data for these.
I use the EntryPath_2 to create a file name and use EntryFile_2.MoveTo(xxx,MoveToOptions.none) to move the file and rename it to xxx - the name the captured in EntryPath_2. The file name and title are stored in an .xml file in a folder with the image files
Later, I download the folder, and it contains the xml file with, say 4 imagefilename/title pairs but only 2 image files. That's how I know the other two are missing.
Today I got another strange result. 3 image files are reported "cannot find the file specified" by my FTP software despite their being shown in the remote directory as having a size. I wonder if this is another symptom of the same problem.
Thanks for your help
Phil |
<a href='www.photocompsoftware.com'>www.photocompsoftware.com</a> |
Dean Brettle
Total Posts:
2015
 |
Re: Missing uploaded files
11/18/2009 3:38:34 PM
This might be caused by a bug that was fixed after 1.3.12. Please upgrade to the latest (currently 1.3.18). If the problem still occurs please post or email me (dean at brettle dot com) the aspx and aspx.cs for your upload page.
The problem you are having FTPing the files makes me think that there might be something else that is going around deleting files on your server, though I have no idea what that could be.
--Dean |
|
Dean Brettle
Total Posts:
2015
 |
Re: Missing uploaded files
11/19/2009 1:45:38 PM
Actually, the problem you are describing *might* be fixed with NeatUpload-1.3.19 (just released). Please give it a try and report back. Also, do you have any sense for how frequently uploaded files are missing?
--Dean |
|