I am trying to remove a large number of files from a location (by large I mean over 100000), whereby the action is initated from a web page. Obviously I cou
Wow. I think you are definitely on the right track with having some other service or entity taking care of the delete. In doing so you could also provide methods for tracking the process of the delete and showing the result to the user using asynch javascript.
As others have said putting this in another process is a great idea. You do not want IIS hogging resources using such long running jobs. Another reason for doing so is security. You might not want to give your work process that ability to delete files from the disk.