By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,934 Members | 1,804 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,934 IT Pros & Developers. It's quick & easy.

Scanning uploads in my asp.net pages

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a
"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 discussion thread is closed

Replies have been disabled for this discussion.