Solved

Upload file works but what if file has virus?

Posted on 2013-01-28
5
232 Views
Last Modified: 2013-01-31
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?
0
Comment
Question by:Camillia
  • 2
  • 2
5 Comments
 
LVL 35

Accepted Solution

by:
Miguel Oz earned 250 total points
ID: 38829172
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
 
LVL 7

Author Comment

by:Camillia
ID: 38829423
They're PDF files. And the hosting server has antivorus as well..i still need it?
0
 
LVL 35

Expert Comment

by:Miguel Oz
ID: 38829861
In that case find out what AV program you have and check my previous link posts to run AV as command line app.
0
 
LVL 16

Assisted Solution

by:Kamal Khaleefa
Kamal Khaleefa earned 250 total points
ID: 38829874
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
 
LVL 7

Author Comment

by:Camillia
ID: 38831865
>>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

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now