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

Prevent clean up of TemporaryFolder on Application Pool Recycle

3 Answers 170 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Lenny_shp
Top achievements
Rank 2
Lenny_shp asked on 15 Jan 2016, 08:17 PM

Is there a way to prevent the temporarily files from being deleted when IIS application pool is recycled?  

3 Answers, 1 is accepted

Sort by
0
Peter Filipov
Telerik team
answered on 20 Jan 2016, 09:17 AM
Hello Lenny,

Thank you for contacting Telerik Support.

Straight to the point. This could be done by overriding the AddCacheDependency of the uploading handler

I will be glad to assist you further.

Regards,
Peter Filipov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Lenny_shp
Top achievements
Rank 2
answered on 27 Jan 2016, 04:10 PM

Can you add this feature into a simple configuration property in future release?   This would come in handy to allow the AsynchUpload to be used 24/7 and also share application pools with other apps.

Please point to a how-to page to override this.   Thanks.

0
Peter Filipov
Telerik team
answered on 28 Jan 2016, 10:33 AM
Hi Lenny,

Thank you for the provided feedback. We have an initiative during the current release cycle to improve our "How To" section. We will discuss your suggestion and document it.

Regards,
Peter Filipov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Peter Yao
Top achievements
Rank 1
commented on 24 Oct 2023, 05:37 PM

https://docs.telerik.com/devtools/aspnet-ajax/controls/asyncupload/how-to/how-to-extend-the-radasyncupload-handler?fireglass_rsn=true#change-cache-dependency

When RemovedCallback() is called, is the implementation of that routine deleting the temp file?

What if I still want to rely on the maximum temp file time, but not based on application pool recycle?

Is the reason different between Expired vs application pool recycle, so we can still retain the max temp file time?

https://learn.microsoft.com/en-us/dotnet/api/system.web.caching.cacheitemremovedreason?view=netframework-4.8.1

 

Rumen
Telerik team
commented on 27 Oct 2023, 06:49 AM

Hi Peter,

The RemovedCallback() routine is tied to the AddCacheDependency method, and it's designed to manage the deletion of temporary files after a specified time interval. To keep temporary files beyond this interval without relying on application pool recycle, you could override the AddCacheDependency method and omit the CacheItemRemovedCallback, thus altering the default behavior for temporary file removal. This way, even if an application pool recycle occurs, your files remain unaffected until the maximum temp file time elapses. You can find more information in this article: How to Create a Custom Handler for RadAsyncUpload.

Tags
AsyncUpload
Asked by
Lenny_shp
Top achievements
Rank 2
Answers by
Peter Filipov
Telerik team
Lenny_shp
Top achievements
Rank 2
Share this question
or