I'm using NeatUpload version 1.3.13 - and have developed a system for managers to upload product images. It's just been 'released' to them after we tested the uploading of about a dozen image files at a time. We repeated this several times - in the same production environment as the end users. No errors, everything works as it should.
The managers (end users) however are reporting the following error:
(see more of the story below the error)
Server Error in '/' Application.
Unable to find the specified file.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Unable to find the specified file.
Line 36: string sku = file.FileName.Substring(0, file.FileName.Length - 4);
Line 37: string directoryPath = Server.MapPath("~/images/graphicsLib/" + file.FileName);
error fires on this line -> Line 38: file.MoveTo(directoryPath, MoveToOptions.Overwrite);
I asked the managers if this was occuring everytime they used the NeatUpload tool.
They replied that no, it only happened twice so far. They had used the upload about 6 times. Each upload contained (aproximatly) over 150 files that totaled (roughly) 20 to 45 MB's per upload. All files uploaded are .jpg files.
So - this is something intermittant, and am wondering if you have any thoughts on the why and how to fix. Personally, I'm totally excited that they pumped so many files through the system with out incident - and so were they actually.
Thanks Dean, NeatUpload is definately more than just "neat". It rocks.
Sorry to take so long to reply. I read your post earlier but I must have accidentally deleted the notification from my inbox. Anyway, 3 things to check:
1. Do the names of the files contain "/", "\", or other similar characters that would cause directoryPath to refer to an invalid path or refer to a file in a non-existent directory?
2. Is the server restarting during the upload? Putting files under the app root can cause the server to restart under some circumstances. I'm not sure how that would cause the particular error you are seeing, but it's worth checking.
3. Is the movement of all the files after upload taking more than stateStaleAfterSeconds (defaults to 60 secs)? If so, NeatUpload could consider the upload "stale" and delete the associated temp files. You can workaround that by either increasing stateStateStaleAfterSeconds or updating processing progress while you move the files so that the upload doesn't go stale.
I think number 3 is it. The managers that are using the upload are working form an office with marginal bandwidth. That, and the fact that they indicated that they've been stacking a few hundred files in queue totaling 40+ MB's for upload leads me to believe that indeed - NeatUpload could consider the upload stale.
I'll employ your suggestions to see if that helps.
1. in your message:
No "/" or "\" or other chars like that.
2. in your message:
The site running the page that has NeatUpload is hosted by an outside hosting company. I have no idea if (by chance) the server was restarted during the upload. Possible. But my hunch (knowing the hosting company) is no.
Thanks again Dean,
NeatUpload is really sweet.
Note that for #3, the relevant time is the time between when all the files have been received by the server and when your code-behind has finished it's processing, NOT the time between when the user starts the upload and when all the files have been received by the server. So the question is, could your code-behind be taking > 60 secs to run?