Upload file works but what if file has virus?

I have an ASP.Net and use RadUpload file control. This works but  a user asked this

"what if someone actually wanted to upload a corrupt, viral file on purpose"?

Our site is  on a hosting server. Do I need to do anything in my ASP.Net to make sure the file is not a viral file?
LVL 8
CamilliaAsked:
Who is Participating?
 
Miguel OzConnect With a Mentor Software EngineerCommented:
It depends on the file type (e.g for text files is not needed)
You need to check what AV program is in your server(check you have permission to run it)  and call it as a separate process
Check:
http://stackoverflow.com/questions/975112/net-virus-scanning-api
Simple example using McAfee
http://forums.asp.net/p/890935/956276.aspx
0
 
CamilliaAuthor Commented:
They're PDF files. And the hosting server has antivorus as well..i still need it?
0
 
Miguel OzSoftware EngineerCommented:
In that case find out what AV program you have and check my previous link posts to run AV as command line app.
0
 
Kamal KhaleefaConnect With a Mentor Information Security SpecialistCommented:
hi

you have to do some validation before you upload the file

for example check the extension of the file and size of the file

also you may upload the file to a temporary file on your hosting then run an antivirus to check them
after that move them to your folder/or data base
0
 
CamilliaAuthor Commented:
>>to run AV as command line app.
This has to be run with every file we upload??

we do check the size and the extension....
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.