I have file upload control in page through which user uploads files to application. I need to restrict user to upload exe,msi and batch files. I checked file extensions it is working fine but when i change an exe file extension to .txt it is allowing me to upload and also i checked with content type of a file. MS excel is not installed on my machine. for an excel file content-type showing as application/octet-stream and for an exe file also content-type showing as application/octet-stream. so that am aunable to upload excel files also. For many of the files am getting content type as application/octet-stream.
Please help me is there any piece of code to find out exe,msi and batch (.bat) files.