Hi,
I need a validator for file upload functionality in my application developed using asp.net.
the validator should allow only doc,pdf files. Even if the user tries to enter malicious files
by changing the extension,the validator should not allow.
Please let me know how to detect renamed extensions in C#
Thanks in advance
File uploader validations
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Deepak VermaRank #672 · 3.6K reputationPosted Oct 29, 2013, 6:49 PM EDT
you should check for MIME Type of uploaded file. For a complete list of MIME Types check out this link:
http://reference.sitepoint.com/html/mime-types-full