473,320 Members | 1,857 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Scanning uploads in my asp.net pages

We have a few pages that accept uploads and want to scan the files before
accepting them. Does Asp.net have a way of doing a virus scan?

We are using Trendmicro to scan files and email but don't know if we can use
it with our pages to handle files that our clients upload. Is there some
type of API that would allow us to do this?

I want to be able to Upload Word files using:

<input id="MyFile" visible="true" style="width:200px" type="File"
runat="Server">

I then get the file and then do a:

MyFile.PostedFile.SaveAs(PathFileOut)

But I want to do a Virus Scan before I do this. We are using Trend Micro at
the moment.

Thanks,

Tom
Jan 10 '07 #1
4 1355
You will need to look into the documentation of the antivirus application:

1. Does it provide any API that you can call?
2. Can it monitor a folder for any changes so that you first temporarily
upload it to the corresponding directory and after scanning is done, it can
be moved to final location?

--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujinionline.com
-----------------------------------------
"tshad" <ts**********@ftsolutions.comwrote in message
news:eS**************@TK2MSFTNGP04.phx.gbl...
We have a few pages that accept uploads and want to scan the files before
accepting them. Does Asp.net have a way of doing a virus scan?

We are using Trendmicro to scan files and email but don't know if we can
use it with our pages to handle files that our clients upload. Is there
some type of API that would allow us to do this?

I want to be able to Upload Word files using:

<input id="MyFile" visible="true" style="width:200px" type="File"
runat="Server">

I then get the file and then do a:

MyFile.PostedFile.SaveAs(PathFileOut)

But I want to do a Virus Scan before I do this. We are using Trend Micro
at the moment.

Thanks,

Tom


Jan 10 '07 #2
"Gaurav Vaish (www.Edujini-Labs.com)" <ga*****************@nospam.gmail.com>
wrote in message news:OU**************@TK2MSFTNGP06.phx.gbl...
You will need to look into the documentation of the antivirus application:

1. Does it provide any API that you can call?
2. Can it monitor a folder for any changes so that you first temporarily
upload it to the corresponding directory and after scanning is done, it
can be moved to final location?
1. I have called TrendMicro about this - but no one seems to know. I have
seen quite a few people talking about an API but so far no one seems to know
how it is done. All you see is - you would have get the API from your AV
supplier but not they have done it.

2. I could do that but how would I know if there was a virus in it or not?

Thanks,

Tom
>

--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujinionline.com
-----------------------------------------
"tshad" <ts**********@ftsolutions.comwrote in message
news:eS**************@TK2MSFTNGP04.phx.gbl...
>We have a few pages that accept uploads and want to scan the files before
accepting them. Does Asp.net have a way of doing a virus scan?

We are using Trendmicro to scan files and email but don't know if we can
use it with our pages to handle files that our clients upload. Is there
some type of API that would allow us to do this?

I want to be able to Upload Word files using:

<input id="MyFile" visible="true" style="width:200px" type="File"
runat="Server">

I then get the file and then do a:

MyFile.PostedFile.SaveAs(PathFileOut)

But I want to do a Virus Scan before I do this. We are using Trend Micro
at the moment.

Thanks,

Tom



Jan 10 '07 #3
2. I could do that but how would I know if there was a virus in it or not?

Ensure that the action is set to quarantine and delete the file if virus is
found. Both of you - AV and your code - monitor the directory. If AV deletes
the file after scanning, it had virus.
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujinionline.com
-----------------------------------------
Jan 11 '07 #4
"Gaurav Vaish (www.Edujini-Labs.com)" <ga*****************@nospam.gmail.com>
wrote in message news:uB**************@TK2MSFTNGP03.phx.gbl...
>2. I could do that but how would I know if there was a virus in it or
not?

Ensure that the action is set to quarantine and delete the file if virus
is found. Both of you - AV and your code - monitor the directory. If AV
deletes the file after scanning, it had virus.
That is exactly what I am going to have to do.

I did find out that Office Scan was deleting the file if it had a virus. So
I can do as you suggest. When the file uploaded - I then check to see if
the file is there. It turns out that there is a log I can look at to see if
the filename is there. If it is, it was quarantined. It took a while to
find this file but I did find it. Tech support didn't know about the file.
I had to show it to them. Their solution was to look at the logs from their
Master Console. This was not an option either as that would involve someone
looking at it periodically and not via my program.

I don't know about any API - other that a command line option where you have
to stop the real time scanner to use it. Not an option.

Thanks,

Tom
>

--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujinionline.com
-----------------------------------------


Jan 11 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: CHANGE username to westes | last post by:
What are the most popular, and well supported, libraries of drivers for bar code scanners that include a Visual Basic and C/C++ API? My requirements are: - Must allow an application to be...
1
by: Doug Helm | last post by:
I should have been more clear in my subject line. I was also the poster in the "File Uploads" topic. I'm not having any luck getting file uploads to work (multi-part HTML form) on a Windows...
0
by: davidshook | last post by:
I have wmv8 video files embeded in html pages. The video plays with no problems, but it does not allow the user to scan the video's time line. In mozilla the scan controlles are grayed out, and in...
6
by: nwheavyw8 | last post by:
I am currently trying to write a simple PHP script that will split an uploading file up into 500kb "chunks", then read and concatenate them back together when accessed for download. I can't seem...
1
by: matt | last post by:
I'm using this to scan Multiple pages into Access 2k :- Call KillTempFile strTempFile = TempFile(False, "scan") Me.scanControl.MultiPage = True Me.scanControl.ScanTo = FileOnly...
6
by: Bob Alston | last post by:
I am looking for others who have built systems to scan documents, index them and then make them accessible from an Access database. My environment is a nonprofit with about 20-25 case workers who...
3
by: tshad | last post by:
We have a few pages that accept uploads and want to scan the files before accepting them. Does Asp.net have a way of doing a virus scan? We are using Trendmicro to scan files and email but don't...
1
kirubagari
by: kirubagari | last post by:
For i = 49 To mfilesize Step 6 rich1.SelStart = Len(rich1.Text) rich1.SelText = "Before : " & HexByte2Char(arrByte(i)) & _ " " & HexByte2Char(arrByte(i + 1)) & " " _ &...
10
by: Kal | last post by:
I recently installed Windows 2008 Server to replace a crashed hard drive on a web server with a variety of web pages including several classic ASP applications. One of these makes extensive use of...
2
by: iheartvba | last post by:
Hi Guys, I have been using EzTwain Pro to scan documents into my access program. It allows me to specify the location I want the Doc to go to. It also allows me to set the name of the document...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.