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

RadUploadTemp folder not getting cleaned up

10 Answers 845 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Albert Shenker asked on 19 Dec 2011, 09:00 PM
I find that the RadUploadTemp folder is not being cleaned up. I have the various files RadAsyncUpload creates in that folder from months ago. Is this expected behavior? If so, is there a way to get the files to be cleaned up in some automatic fashion, or do I need to write some custom code to go in and delete files older than a certain time?

10 Answers, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 22 Dec 2011, 12:39 PM
Hi Albert,

The expiration time for the files in the temporary folder could be controlled via the TemporaryFileExpiration property of the RadAsyncUpload. Please adjust this property to the desired time interval.

Regards,
Dimitar Terziev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Raji
Top achievements
Rank 1
answered on 23 Feb 2012, 01:26 AM

Hi Dimitar,

I did set the RadAsyncUpload property as shown below.

RadAsyncUpload1.TemporaryFileExpiration = new TimeSpan(0, 0,20, 0, 0);

It is suppose to delete the file after 20 mints but still I can see the files there. I am using Telerik.Web.UI.dll(Ver 2010.3.1317.20), IE 7.0 browser, .Net 2.0.

Thanks,
Raji

0
Dimitar Terziev
Telerik team
answered on 24 Feb 2012, 02:14 PM
Hello Raji,

Since you are using rather old version of the controls, could you please check whether the same problem occurs with a newer version? Please note that in the latest version of the controls we are not providing .Net 2.0 dll, so you should build your own. A document with instructions on how to build .Net 2.0 dll is provided with the source code of the controls.

Regards,
Dimitar Terziev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Raji
Top achievements
Rank 1
answered on 24 Feb 2012, 05:50 PM
Hi Dimitar,

In order to test I need to upgrade the .net framework. Can you verify if this works? Is it possible to use the latetest version of the Telerik controls with .Net 2.0. If yes can you send me the link to the documentation.

Thanks,
Raji
0
John af P
Top achievements
Rank 2
answered on 29 Feb 2012, 09:52 AM
I have the same behavior on .Net 3.5 with version 2011.3.1305.35. Most of the files get cleaned up but some of them are still there after months.

/John
0
Dimitar Terziev
Telerik team
answered on 29 Feb 2012, 04:31 PM
Hi John,

Could you specify whether there is something in common between the files that haven't been cleared, so we could perform some testing locally?

Kind regards,
Dimitar Terziev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
John af P
Top achievements
Rank 2
answered on 01 Mar 2012, 09:58 AM
Cant really see anything. Attached a file with small sample of the catalog. I'm running on IIS6.

/John


Edit: Now I realise that all documents not getting cleand up have a corresponding entry in application log with this warning:

Event Type: Warning
Event Source: ASP.NET 2.0.50727.0
Event Category: Web Event 
Event ID: 1309
Date: 2012-02-07
Time: 12:50:21
User: N/A
Computer: D02AR1SWB059
Description:
Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: 2012-02-07 12:50:21 
Event time (UTC): 2012-02-07 11:50:21 
Event ID: 2024c41de6f948f1905b7e0a3036d7b5 
Event sequence: 1088833 
Event occurrence: 24 
Event detail code: 0 
 
Application information: 
    Application domain: /LM/W3SVC/1075933917/ROOT-1-129730618034703016 
    Trust level: Full 
    Application Virtual Path: / 
    Application Path: C:\Apps\405000\WebSites\PublicWeb\ 
    Machine name: XXX
 
Process information: 
    Process ID: 5076 
    Process name: w3wp.exe 
    Account name: NT AUTHORITY\NETWORK SERVICE 
 
Exception information: 
    Exception type: IOException 
    Exception message: The process cannot access the file 'C:\Apps\405000\WebSites\PublicWeb\App_Data\RadUploadTemp\1328611694996CVMYDOC-En.pdf' because it is being used by another process. 
 
Request information: 
    Request URL:  
    Request path:  
    User host address:  
    User:  
    Is authenticated: False 
    Authentication Type:  
    Thread account name: NT AUTHORITY\NETWORK SERVICE 
 
Thread information: 
    Thread ID: 1 
    Thread account name: NT AUTHORITY\NETWORK SERVICE 
    Is impersonating: False 
    Stack trace:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.Delete(String path)
   at Telerik.Web.UI.AsyncUploadHandler.RemovedCallback(String key, Object value, CacheItemRemovedReason reason)
   at System.Web.Caching.CacheEntry.CallCacheItemRemovedCallback(CacheItemRemovedCallback callback, CacheItemRemovedReason reason)
 
 
Custom event details: 


For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

0
Dimitar Terziev
Telerik team
answered on 05 Mar 2012, 08:08 AM
Hi John,

Your error log provides the exact reason why some of your files are not deleted:
Exception information: 
    Exception type: IOException 
    Exception message: The process cannot access the file 'C:\Apps\405000\WebSites\PublicWeb\App_Data\RadUploadTemp\1328611694996CVMYDOC-En.pdf' because it is being used by another process.


As it appears at the time when your temporary files should be removed, there is some process which is using them.

Greetings,
Dimitar Terziev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
John af P
Top achievements
Rank 2
answered on 05 Mar 2012, 12:06 PM
Yes you are right. Im using session to store the uploaded files as DimeAttachment. I guess that if the the session doesn't release the file stream before the files are up for deletion this error would occur.

/John
0
Dimitar Terziev
Telerik team
answered on 07 Mar 2012, 10:36 AM
Hello John,

You are right as well, indeed the files could not be deleted while some process is using them.

All the best,
Dimitar Terziev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
AsyncUpload
Asked by
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
Answers by
Dimitar Terziev
Telerik team
Raji
Top achievements
Rank 1
John af P
Top achievements
Rank 2
Share this question
or