[RESOLVED]File Upload with Virus Scan integration

Hi ,

I am working on a new project which has requirement of scanning file (via anti virus scanner)  before uploading it to the server ?  Any guidance would be highly appreciated ?

put into a folder and configure the antivirus to scan this folder

Hi roshan605,

Thanks for your post.

"SAV Dynamic Interface (SAVDI) provides an easy-to-integrate, general-purpose interface to the Sophos detection engine. It enables programs written in any language to scan files and data for malware and is particularly popular with ISPs/ASPs running in a
.NET environment."

Another alternative is to use Process class to start an anti-virus scanner on the server (http://www.dotnetperls.com/process-start) and parse its results. For example, here’s the list
of command-line parameters for AVG:


By the way, as you develop your solution, you will need to test if you’re able to identify an infected file. But it’s not recommended to use a real infected file. However, you can create a text file with the string below. This string is commonly identified
by anti-virus scanners as a infected file for testing purposes (for more information, search for EICAR Standard Anti-Virus Test File).

There are several similar threads:

#Virus Scan in File Upload -asp.net


#How to scan a file uploaded by a user for viruses in C#?


#Check upload file for virus in MVC3


Hope this can be helpful.

Best Regards,


Leave a Reply