Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Open Password protected file

Open Password protected file

Scheduled Pinned Locked Moved .NET (Core and Framework)
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    ksss_maheshece
    wrote on last edited by
    #1

    Hai friends, Can open a

    password protected

    file for uploading and streamming.I want to implement in webapplication.IF it's can u tell me that solution :confused: Thanks in advance. Cheer, MAHESH.K

    C 1 Reply Last reply
    0
    • K ksss_maheshece

      Hai friends, Can open a

      password protected

      file for uploading and streamming.I want to implement in webapplication.IF it's can u tell me that solution :confused: Thanks in advance. Cheer, MAHESH.K

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      Password protected in what way? Is the file system denying access unless you have the correct credentials? Is the file itself encrypted and you need the correct key to decrypt it? Is it some other way?

      User group: Scottish Developers Blog: Can Open... Worms? Everywhere! Quote: Man who stand on hill with mouth open wait long time for roast duck to drop in.

      K 1 Reply Last reply
      0
      • C Colin Angus Mackay

        Password protected in what way? Is the file system denying access unless you have the correct credentials? Is the file itself encrypted and you need the correct key to decrypt it? Is it some other way?

        User group: Scottish Developers Blog: Can Open... Worms? Everywhere! Quote: Man who stand on hill with mouth open wait long time for roast duck to drop in.

        K Offline
        K Offline
        ksss_maheshece
        wrote on last edited by
        #3

        No. Just i goona upload a password protected file. at that time i wanna promot message box for feeding password

        C 1 Reply Last reply
        0
        • K ksss_maheshece

          No. Just i goona upload a password protected file. at that time i wanna promot message box for feeding password

          C Offline
          C Offline
          Colin Angus Mackay
          wrote on last edited by
          #4

          Okay - So, I still don't understand in which way the file is actually protected. Saying it is "password protected" is too vague as there are a multitude of ways in which a "password" could be applied to a file. I'm going to assume that you can access the file (so it isn't the file system provding the "password protection"). You just upload the file as you would any other file. There is no difference. You want to promt the user for the password? At what point? Before uploading? After uploading? Does it matter because it is just a text box. Now, what you do with the what the user has given you in the text box and the file is probably the bit you are really after. Uploading files, and getting the contents of a text box are simple. Right? Accessing "password protected" data is the difficult bit. So, my question remains: Exactly how is the file password protected? What is the mechanism for protection. The password is the key, but unless you know how the lock works, how do you know what to do with the key?

          User group: Scottish Developers Blog: Can Open... Worms? Everywhere! Quote: Man who stand on hill with mouth open wait long time for roast duck to drop in.

          M 1 Reply Last reply
          0
          • C Colin Angus Mackay

            Okay - So, I still don't understand in which way the file is actually protected. Saying it is "password protected" is too vague as there are a multitude of ways in which a "password" could be applied to a file. I'm going to assume that you can access the file (so it isn't the file system provding the "password protection"). You just upload the file as you would any other file. There is no difference. You want to promt the user for the password? At what point? Before uploading? After uploading? Does it matter because it is just a text box. Now, what you do with the what the user has given you in the text box and the file is probably the bit you are really after. Uploading files, and getting the contents of a text box are simple. Right? Accessing "password protected" data is the difficult bit. So, my question remains: Exactly how is the file password protected? What is the mechanism for protection. The password is the key, but unless you know how the lock works, how do you know what to do with the key?

            User group: Scottish Developers Blog: Can Open... Worms? Everywhere! Quote: Man who stand on hill with mouth open wait long time for roast duck to drop in.

            M Offline
            M Offline
            MaheshSelva
            wrote on last edited by
            #5

            I'll continue with thanks in net if we upload any file using file upload control,it won't ask for any protection. I need to apply password when i click on upload control.No one can open open or download with out knowing that password.Thank u once again for your consideration. Cheer, MAHESH.K

            L C 2 Replies Last reply
            0
            • M MaheshSelva

              I'll continue with thanks in net if we upload any file using file upload control,it won't ask for any protection. I need to apply password when i click on upload control.No one can open open or download with out knowing that password.Thank u once again for your consideration. Cheer, MAHESH.K

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              So the file isn't password protected at all - you're the one doing the protecting and you want to require a password. Right? Now that's easy.


              Last modified: 14mins after originally posted -- fixed typo

              1 Reply Last reply
              0
              • M MaheshSelva

                I'll continue with thanks in net if we upload any file using file upload control,it won't ask for any protection. I need to apply password when i click on upload control.No one can open open or download with out knowing that password.Thank u once again for your consideration. Cheer, MAHESH.K

                C Offline
                C Offline
                Colin Angus Mackay
                wrote on last edited by
                #7

                MaheshSelva wrote:

                No one can open open or download with out knowing that password.

                Now that is different from what you seemed to be asking for. Basically, you want a web application to provide password protection so that no one can download the file unless they are already authenticated with the site and authorised to do so. You may want to look at Forms Authentication[^]. You then want to look at using an ASPX page to stream the file. Something like this: http://forums.asp.net/t/1263188.aspx[^], but with an authorisation check before it actually streams anything out.

                User group: Scottish Developers Blog: Can Open... Worms? Everywhere! Quote: Man who stand on hill with mouth open wait long time for roast duck to drop in.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups