Solved

Upload file works but what if file has virus?

Posted on 2013-01-28
5
233 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ASP.NET reading ATOM 2 51
Not showing page correctly 3 30
Error in JQuery 5 38
Make an ajax call ithat alters url and updates a listview in asp.net 1 22
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

910 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

23 Experts available now in Live!

Get 1:1 Help Now