Solved

Upload file works but what if file has virus?

Posted on 2013-01-28
5
236 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 36

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 36

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Generate Unique ID in VB.NET 21 134
VS 2015 is giving [No relevant source lines] 2 48
vb.net convert long time to mm:ss 23 34
ASP.net Markup for Sub Menu 2 63
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…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

734 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