I have a webservice running on an IIS server using c# and a asmx file.
The Service is able to upload files requested by users to a ftp-server for them to temporarily view.
The temporary folders are cleared on logout and such things... but if the user does not log out and just closes the tab or the browser in general, the files will stay at the FTPserver...
I wanted to make a "garbagecollector" function wich will clean up these files, or any files older than XXXXX.
So, since the Webservice will timeout after the amount of minutes specified in the IIS config, I can't run a timer to do this.
Is there any event that is triggered when the webservice is about to "shut down" (time-out)?
I was googling like crazy... didn't find anything useful (or I was googling wrong)...