0

My asp.net application is in Web Server A and displays and let download MS-Word or PDF documents that are stored in Web Server B.

For security reasons, I was advised to encrypt and decrypt those documents when serving them up on the webserver A.

Could anyone give me some clue on how to do that?

I've never seen some utility before. My code just give value to a link control and let the user to click on it to display a MS-Word or PDF document, like:

Dim RemoteFolder As String
Dim RemoteFileName As String

RemoteFolder = "http://192.168.32.98/Application/Documents/"
RemoteFileName = "MyWordDocument.doc"

lnkOpenDocument.NavigateUrl = RemoteFolder + RemoteFileName
Jorge
  • 175
  • 1
  • 4
  • 11
  • Do you want to encrypt while transferring from server B to A, then decrypt it back at server A and serve to a user? – Win May 24 '13 at 17:43

1 Answers1

0

Using SSL might help, that protects all request/responses between the two servers. Otherwise .Net does have a encryption/decryption library under System.Security: http://support.microsoft.com/kb/307010 also see this previous post What's the easiest way to encrypt a file in c#?

you can always grab the file from the user, encrypt using one of the above methods, and drop the encrypted file on webserver B. when reading it rather than link directly to the .doc file, link to another asp.net page, pass the ID of the file into that new page and have it pull the file from Webserver B decrypt it and display to the user.

Community
  • 1
  • 1
Paritosh
  • 4,243
  • 7
  • 47
  • 80