Reputation: 7510
I am working on document storage and retrieval application. In which i display the pdf document as an png image , but i have a email button on the top. On clicking that the user would be able to provide an email address to which the document needs to be sent, and I need to send this pdf as an attachment. I need to password protect the file for security reasons. I have no clue on how i can do this in asp.net mvc.
Upvotes: 0
Views: 2951
Reputation: 34810
You can use a compressed, password-protected 7zip file. For added security, compress the file programmatically and set a randomly-generated password your users can only access by logging in to your website.
Upvotes: 0
Reputation: 180787
Password protecting a file has nothing to do with ASP.NET MVC; you would need to password protect it prior to handing it off to ASP.NET MVC for transmission to the client.
Using HTTPS would be more secure.
Password protected PDF using C#
Password protected PDF using C#
Upvotes: 1