Click here to Skip to main content
15,898,134 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: LDAP Pin
Grapes-R-Fun12-Feb-07 2:02
Grapes-R-Fun12-Feb-07 2:02 
QuestionNetwork Error (tcp_error) Pin
Siva Rama Raju9-Feb-07 19:06
Siva Rama Raju9-Feb-07 19:06 
QuestionFileupload in ASP.NET2.0 AJAX enabled website Pin
roopa_ rai9-Feb-07 17:38
roopa_ rai9-Feb-07 17:38 
AnswerRe: Fileupload in ASP.NET2.0 AJAX enabled website Pin
Bassam Saoud9-Feb-07 22:54
Bassam Saoud9-Feb-07 22:54 
Questionunexpected error 0x8ffe2740 occured Pin
prabhu dot net9-Feb-07 17:26
prabhu dot net9-Feb-07 17:26 
AnswerRe: unexpected error 0x8ffe2740 occured Pin
we_swati12-Feb-07 7:11
we_swati12-Feb-07 7:11 
QuestionAsp.net & Flash Pin
AnhTin9-Feb-07 16:35
AnhTin9-Feb-07 16:35 
QuestionDelete Temp File after N seconds Pin
Shawn_H9-Feb-07 16:04
Shawn_H9-Feb-07 16:04 
Im using ASP.net 2.0. I have a need to temporarily save an image to disk, and then want it automatically deleted within a minute.

Im a gernating dynamic pdfs, with dynamic charts embeded in the PDF. The charts need to be temporarily saved as an image on disk with Guid.NewGuid().ToString() + ".jpg"; for example as the file name.

I thought about using the Web.Cache with a Delegate CacheItemRemoveCallBack

setting abosulte expiration to expire in 60 seconds, then when the listener is fired, delete the file. Problem is, that method will not work. because the file has a unique key in cache (using the file name as the cache key which is from NewGuid) , it will never be fired beacause that cache key will never be fired again. the same image will never be generated twice.

For time-based dependencies, the callback is not fired when the time is up, but rather the next time the cached item is accessed. So cant depend on these to act as a timer for me to remove an item in N seconds.

I would rather not get into the business of schedule task manager to run and delete files etc... I suppose that in this handler (btw, its in an httpHandler) I could just do a check on time stamps and remove files older than N secs, I would rather not slow the request down though. For some reason, im thinking Threading namspace / Timer object (maybe overboard).

Does anyone have any suggestions? let me know if you need more info.

Thank You all greatly in advance

Shawn

AnswerRe: Delete Temp File after N seconds Pin
Bassam Saoud9-Feb-07 22:58
Bassam Saoud9-Feb-07 22:58 
Questionweb service - how to setup access Pin
we_swati9-Feb-07 13:40
we_swati9-Feb-07 13:40 
AnswerRe: web service - how to setup access Pin
asithangae9-Feb-07 16:49
asithangae9-Feb-07 16:49 
QuestionSecurity ( redirect user to some forms in loggin according to ROLE) Pin
Islam Khalil Saber9-Feb-07 13:24
Islam Khalil Saber9-Feb-07 13:24 
AnswerRe: Security ( redirect user to some forms in loggin according to ROLE) Pin
kubben12-Feb-07 2:16
kubben12-Feb-07 2:16 
GeneralRe: Security ( redirect user to some forms in loggin according to ROLE) Pin
Islam Khalil Saber12-Feb-07 11:55
Islam Khalil Saber12-Feb-07 11:55 
GeneralRe: Security ( redirect user to some forms in loggin according to ROLE) Pin
kubben13-Feb-07 2:37
kubben13-Feb-07 2:37 
QuestionRegular Expression Question Pin
achimera9-Feb-07 12:54
achimera9-Feb-07 12:54 
AnswerRe: Regular Expression Question Pin
Guffa9-Feb-07 13:05
Guffa9-Feb-07 13:05 
QuestionEmail Address Verification... Pin
code-frog9-Feb-07 12:36
professionalcode-frog9-Feb-07 12:36 
AnswerRe: Email Address Verification... Pin
User 17164929-Feb-07 13:43
professionalUser 17164929-Feb-07 13:43 
Question.dll ? A solution file not present Pin
lehya9-Feb-07 10:46
lehya9-Feb-07 10:46 
AnswerRe: .dll ? A solution file not present Pin
asithangae9-Feb-07 16:39
asithangae9-Feb-07 16:39 
Questionchange the webservice Pin
srinandan..9-Feb-07 8:24
srinandan..9-Feb-07 8:24 
AnswerRe: change the webservice Pin
kubben9-Feb-07 9:53
kubben9-Feb-07 9:53 
GeneralRe: change the webservice Pin
srinandan..9-Feb-07 20:35
srinandan..9-Feb-07 20:35 
GeneralRe: change the webservice Pin
kubben12-Feb-07 2:06
kubben12-Feb-07 2:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.