Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

virus scan/risk for file uploads in asp.net 2.0 ( web farm environment)

Posted on 2008-10-05
5
Medium Priority
?
818 Views
Last Modified: 2013-12-11
how to scan for virus while uploading file in asp.net,

this allows me to tell user if virus infected  and if not will upload file(saving file so that user can download it from the application when needed)  on to web server.

I need sample code , so that i can get started on this.

also my application has a webfarm environment how to replicate the uploaded file
on the three servers(geographically divided) to be in sync.

please tell me how to proceed , i am a naive developer

environment: asp.net 2.0, c#, oracle 10g, vstudio 2005
0
Comment
Question by:Swetha_aJaX
[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
  • 3
  • 2
5 Comments
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 22655490
every virus scanner has a command line utility for scanning files for viruses
have a look at this link as it guides for some anti virus command line arguments, what you can do is load the file to the server directory and then call the anti-virus through process.start with the required command line arguments
http://forum.softwareblaze.com/viewtopic.php?t=127
0
 

Author Comment

by:Swetha_aJaX
ID: 22655560
Hi ragi0017,

your solution partly answers my question , can you please give me more info.

1)where do i need to install the anti-virus software.

2)and how do i know about the command line codes ( will anti virus provider gives them)

3)how can i replicate the file uploaded onto three servers( web farm environment -- to make them in sync)

hope i get a detailed reply

Many Thanks!
0
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 22657061
in a web application scenario i dont think that you can call the antivirus command line to scan the file
in this case you will have to bring the file to the server and then only scan it - it involves a risk but i cannot think of other way solution where you scan the file on the client side

every anti virus gives a command line code to scan the files or directories - for that you need to check the documentation of the antivirus

replicate files to web farm - hard question to answer but you need a tool which monitors folders on the web farm and if some file changes on one machine replicates the same file to other machines on the farm
0
 

Author Comment

by:Swetha_aJaX
ID: 22661131
good to see your reply

now i got some idea , of what can be done ?

but its all like theory - to do  practical , i need some sample code
involving some command line code used.

first we need to save it on a location and then call the dll to scan the file from saved location.

if this has virus init -- user is notified

else need to save it on the actual server location.

can we call file.saveas  twice in the same code?

can you suggest me sample code , to get started?
0
 
LVL 26

Accepted Solution

by:
Anurag Thakur earned 1500 total points
ID: 22665064
find out the command line code to call the antivirus form the documentation or searching through the net
after that you can call the command line from System.Diagnostics.Process.Start
some samples (may be not the best ones but still)
http://blogs.msdn.com/brada/archive/2004/09/20/232002.aspx
http://www.gamedev.net/community/forums/topic.asp?topic_id=452594
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines

597 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