A file protector for Asp.net website to secure confidential files.
File Protector project is to secure confidential files in encrypted format to keep these files safe from downloading/surfing. We can secure any type of file using executable available in this repository. This works with asp.net web applications. This is under development for asp.net core website and not working for this version. To use this project to secure files a database connection is required as attached executable encrypts specified files and saves in database to protect.
How to Use:
1: Create a sql server database with any name. We can use our application database to keep encrypted files.
2: Extract FileEncryptor.zip and open FilePathGenerator.exe as below:
3: Browse the folder within website/webapplicaiton folder whose files need to be encrypted.
4: In extensions field, enter comma seperated file extensions to encrypt.
5: Enter database connection string in connection string text box.
6: Press generate button.
After pressing generate button, executable will encrypt all files for given extensions in specified folder. after encrypting files, application will display a message as given below:
7: copy message and add handler values in web.config file as given below:
<handlers>
<add verb="*" path="*.html" type="FileServer.Server, FileServer" name="htmlHandler" />
<add verb="*" path="*.css" type="FileServer.Server, FileServer" name="cssHandler" />
<add verb="*" path="*.js" type="FileServer.Server, FileServer" name="jsHandler" />
</handlers>
</system.webServer>
<add key="FileServerConnectionString" value="ConnectionString for your database"/>
<add key="FileServerHeader" value="a secure header for your confidiential files"/>
</appSettings>
{
// Get objects.
HttpContext context = base.Context;
// Complete.
}