Antivirus scanning files uploaded to SQL blob

We have a request to develop a file sharing component of a .net application to allow a client to upload files and have others download those files.  The files will be saved to SQL as blob within the database, so we're not concerned with our infrastructure, but am concerned if a user uploads an infected file and it gets propagated.  We then become the mechanism that spread their infection.  We plan on getting a release of liability but I want to explore options to scan the file before SQL gets it.  We use AVG Corporate, but I don't think there are any web scanning options there.  

Any recommendations on a web server side component that would allow for scanning prior to handing off to SQL?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David Johnson, CD, MVPOwnerCommented:
can you do a scan on demand of a folder?
Athar SyedCommented:
You are uploading to a temporary file on the server, which is then being inserted into your DB. If you are not doing, this step, you probably should be doing it, in order to scan them before uploading them. You can also create a Windows Service which will scan the file and insert them in the DB. In this case, your web page will upload the files to the upload folder and trigger the windows service for that file.

AFAIK all antivirus applications have an Scan-On-Demand feature. Some allow from command line, others permit to be called only from the core application. So research and choose your antivirus as per your requirement.

Also to be safe, rename the uploaded files with an additional .tmp extension, scan them, then save them in the DB without the .tmp extension. This is to avoid executable applications on the web server.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.