Shiva said:
One option is to do Process.Start () to start the virus scanner for
the uploaded file. You might want to check your scanner's
command-line options for this.
This is certainly the most straightforward solution. But depending on the
server's load, it might turn out to be disastrous one. First, creating
processes is quite an expensive operation. Second, the virus scanner must
reload its virus signture database *each* time, which can be horribly
expensive.
So ideally, you want a virus scanner with a managed API -- which doesn't
exist yet, at least to my knowledge.
The next best option is a virus scanner with any API you can use via
P/Invoke or COM Interop. Sophos for example has SAVI, a COM-based API that
you could use to directly invoke the virus scanner's functions without the
overhead of creating new processes, and that would also allow you to
"buffer" virus signature data.
Cheers,