Error Uploading using multple fileUpload on one page

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Error Uploading using multple fileUpload on one page

Fawzi

Hi Dean I am having a problem with FileUpload this error occurs at the call to moveto method

if you any insight into what could be causing something like this.

Thank you.

I have 3 file uploads on my page these uploads are used to upload some files and images

if I have the 3 upload having file it works fine no problem

but the issue if I wan lets say update one of my file and I have one fileupload has files

it generate this error see below

System.IO.IOException: The process cannot access the file because it is being used by another process.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

   at System.IO.__Error.WinIOError()

   at System.IO.FileInfo.MoveTo(String destFileName)

   at Brettle.Web.NeatUpload.FilesystemUploadedFile.MoveTo(String path, MoveToOptions opts) in D:\NeatUpload-1.3.18\dotnet\src\Brettle.Web.NeatUpload\Brettle.Web.NeatUpload\FilesystemUploadedFile.cs:line 109

   at Brettle.Web.NeatUpload.InputFile.MoveTo(String path, MoveToOptions opts) in D:\NeatUpload-1.3.18\dotnet\src\Brettle.Web.NeatUpload\Brettle.Web.NeatUpload\InputFile.cs:line 186

this is a section of my config file

<neatUpload useHttpModule="false">

<providers>

<add name="DirectUploadsTMP" type="Brettle.Web.NeatUpload.FilesystemUploadStorageProvider" tempDirectory="D:\App_Data\NeatUpload"/>

</providers>

</neatUpload>

"""""""D:"

<location path="AddItem.aspx">

<system.web>

<neatUpload useHttpModule="true" defaultProvider="DirectUploadsTMP"/>

<httpRuntime executionTimeout="10000" maxRequestLength="2097151" appRequestQueueLimit="10000" enable="true"/>

</system.web>

</location>

one more thing to mention I am using the new version of neatupload 1.3.18

Thanks again

Reply | Threaded
Open this post in threaded view
|

Re: Error Uploading using multple fileUpload on one page

Dean Brettle
Administrator
This error typically occurs when you have opened a Stream (e.g. by accessing the FileContent property) and not closed it. --Dean
Reply | Threaded
Open this post in threaded view
|

Re: Error Uploading using multple fileUpload on one page

Guest-1011
Thank you for the quick reply if I close the content stream will I still can do file file.moveto or anther function before the page fully loaded the file upload goes out of the scope?
Reply | Threaded
Open this post in threaded view
|

Re: Error Uploading using multple fileUpload on one page

Dean Brettle
Administrator
Yes. --Dean