RadUploadTemp folder not getting cleaned up

11 posts, 0 answers
  1. Albert Shenker
    Albert Shenker avatar
    579 posts
    Member since:
    Mar 2004

    Posted 19 Dec 2011 Link to this post

    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?
  2. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1268 posts

    Posted 22 Dec 2011 Link to this post

    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
  3. Raji
    Raji avatar
    56 posts
    Member since:
    Jul 2011

    Posted 22 Feb 2012 Link to this post

    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

  4. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1268 posts

    Posted 24 Feb 2012 Link to this post

    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.
  5. Raji
    Raji avatar
    56 posts
    Member since:
    Jul 2011

    Posted 24 Feb 2012 Link to this post

    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
  6. John af P
    John af P avatar
    7 posts
    Member since:
    Nov 2009

    Posted 29 Feb 2012 Link to this post

    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
  7. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1268 posts

    Posted 29 Feb 2012 Link to this post

    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.
  8. John af P
    John af P avatar
    7 posts
    Member since:
    Nov 2009

    Posted 01 Mar 2012 Link to this post

    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.

  9. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1268 posts

    Posted 05 Mar 2012 Link to this post

    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.
  10. John af P
    John af P avatar
    7 posts
    Member since:
    Nov 2009

    Posted 05 Mar 2012 Link to this post

    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
  11. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1268 posts

    Posted 07 Mar 2012 Link to this post

    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.
Back to Top