Files under \App_Data\RadUploadTemp not completed removed

2 posts, 0 answers
  1. Meng
    Meng avatar
    57 posts
    Member since:
    Apr 2011

    Posted 10 Jun 2014 Link to this post

    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,,  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. Hristo Valyavicharski
    Hristo Valyavicharski avatar
    975 posts

    Posted 12 Jun 2014 Link to this post

    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.

    Hristo Valyavicharski

    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.

Back to Top