Solved

Upload file works but what if file has virus?

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

785 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