This is a migrated thread and some comments may be shown as answers.

Files under \App_Data\RadUploadTemp not completed removed

2 Answers 372 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Meng
Top achievements
Rank 1
Meng asked on 10 Jun 2014, 02:57 PM
Hi there,

Here is a problem I met when using RadAsyncUpload. The files under \App_Data\RadUploadTemp were not completed removed after the timespan specified in TemporaryFileExpiration (10 minutes). In my project, I uploaded 19 files, only 17 files were removed from the temp folder after 15 mins. The other two files were still left in the folder. We did not use UploadedFile.SaveAs() in our project, we use read via Input Stream instead.

According to this thread, http://www.telerik.com/forums/how-to-delete-temporary-file,  the files are supposed to be removed completed, while it is not true in my project. Is there any way to ensure all the files under the temp folder be removed after a certain amount of time? Please help. Any suggestions is much appreciated. 

2 Answers, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 12 Jun 2014, 07:35 AM
Hi Meng,

Here is how temporary files are working:

When file is selected it is uploaded into the Temporary Folder and the AsyncUpload adds its name to the ASP.NET Application Cache for further removal (after the TemporaryFileExpiration passes). If postback occurs the AsyncUpload will move this file from the Temporary to the Target folder and it also removes the file name from the application cache.

However if postback does not occur the application will remove the temp file from the Temporary folder after the TemporaryFileExpiration time passes. Application knows which file to remove, because the file name still exists in the cache.

When the application or the IIS are restarted for some reason the cache will be lost. In this case all files names that exist in the cache for further removal won't be removed.

Maybe this is what happens on your machine.

Regards,
Hristo Valyavicharski
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Richard
Top achievements
Rank 1
answered on 27 Feb 2018, 04:27 PM

We have experienced a similar problem in production recently.

It was fixed by granting IIS_IUSR Full Access to the App_Data folder.

IIS needs permission to delete temporary files from App_Data/RadUploadTemp.

Tags
AsyncUpload
Asked by
Meng
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
Richard
Top achievements
Rank 1
Share this question
or