I have to create a website where users will upload the files and after that those files will be encoded with the help of an encoder exe. I want to know if I should integrate the file encoding logic with the file uploading logic or create a different windows service which will be hitting the database in a definite time interval and will encode the non encoded files?
Thanks in advance.
Since encoding files is a “long-running task” it shouldn’t per part of ASP.NET itself… I would strongly recommend use of Windows Service… esp. if you already have a DB this can easily be scaled if needed…
EDIT – as per comment:
long-running thread in ASP.NET means among other things:
A Windows Service has the nice feature of running without having a user logged in interactively and thus you could scale such a solution by adding more systems and installing the Windows Service… for an alternative approach (Task scheduler based) see answer from David Piras