project type?

  • Thread starter Thread starter Bob Weiner
  • Start date Start date
B

Bob Weiner

I would like to do some file processing on files received via a web upload.

Basically, the end user will upload an excel file via ASP.Net app which will
store the file in an InQueue directory. It will then launch a separate
process which will move the file to a working directory, perform some
processing, and move the updated excel file back to a OutQueue directory
which will be available to the end user via the ASP app.

What is the best way to configure this while keeping the web app decoupled
from the processing app?

The straightforward approach would be to create a web app which launched a
console app for the second phase. Of course, it is running on a server so i
don't really need the console. Another option would be to create the
processing app as a windows service but it won't be that heavily used and I
see no point to keep the program loaded.

It seems like this is a common situation so I was wondering what the "right"
answer was?


Thanks,
bob
 
Much as I hate to say it, a service sounds like the right answer.

Alternative write a windows app (simply easier to debug and install ) thats
in the servers startup group.

Warning : beware of file locking. The service will likely see the file
before it has finished being written!
 
I will suggest a windows service, console are alright but you need to
manually start it when the machine reboots (or build some batch to start it).

That's my advice.

Cheers
Salva
 
File locking is a good point; I'm looking at that now. Also, ensuring that
those lousy COM objects get cleaned up after I'm done with excel.

I was thinking about writing a small intermediate service, that monitored
the InQueue then called the actually processing application after it
detected the new file. This approach leaves me with two questions:
1. How would I know when the file was completely written to prevent
jumping the gun? and
2. I am still stuck on my original question about what project type
to use for the processing application.

Thanks for your reply,
bob
 
Back
Top