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. Web Development
  3. ASP.NET
  4. Secure Url

Secure Url

Scheduled Pinned Locked Moved ASP.NET
tutorialquestion
6 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.
  • D Offline
    D Offline
    DotNetXenon
    wrote on last edited by
    #1

    The web application has a link button which when clicked uses the ID in session and opens ID.doc in another machine. Here is how I access http://TestApp/MainPage.aspx, I get the link button and click it and ID.doc opens. Also, am able to open http://TestApp/Docs/ID.doc [this is the virtual directory path where all the ID.docs reside] The user should not access http://TestApp/Docs/ID.doc [^] Do you have suggestions on how to do this?

    ------------------------------------------------------------ "The only true wisdom is in knowing you know nothing." --Socrates

    D M 2 Replies Last reply
    0
    • D DotNetXenon

      The web application has a link button which when clicked uses the ID in session and opens ID.doc in another machine. Here is how I access http://TestApp/MainPage.aspx, I get the link button and click it and ID.doc opens. Also, am able to open http://TestApp/Docs/ID.doc [this is the virtual directory path where all the ID.docs reside] The user should not access http://TestApp/Docs/ID.doc [^] Do you have suggestions on how to do this?

      ------------------------------------------------------------ "The only true wisdom is in knowing you know nothing." --Socrates

      D Offline
      D Offline
      DigiOz Multimedia
      wrote on last edited by
      #2

      What you can do is to place the file outside of the wwwroot directory, and then stream it to the user when needed. That way the user won't be able to access it directly through a URL.

      Pete Soheil DigiOz Multimedia http://www.digioz.com

      1 Reply Last reply
      0
      • D DotNetXenon

        The web application has a link button which when clicked uses the ID in session and opens ID.doc in another machine. Here is how I access http://TestApp/MainPage.aspx, I get the link button and click it and ID.doc opens. Also, am able to open http://TestApp/Docs/ID.doc [this is the virtual directory path where all the ID.docs reside] The user should not access http://TestApp/Docs/ID.doc [^] Do you have suggestions on how to do this?

        ------------------------------------------------------------ "The only true wisdom is in knowing you know nothing." --Socrates

        M Offline
        M Offline
        Michael Sync
        wrote on last edited by
        #3

        If you want the sample, you can check-out this link http://www.codeproject.com/KB/aspnet/Protect_files_to_downloas.aspx[^]

        Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

        N 1 Reply Last reply
        0
        • M Michael Sync

          If you want the sample, you can check-out this link http://www.codeproject.com/KB/aspnet/Protect_files_to_downloas.aspx[^]

          Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

          N Offline
          N Offline
          N a v a n e e t h
          wrote on last edited by
          #4

          Michael Sync wrote:

          If you want the sample, you can check-out this link http://www.codeproject.com/KB/aspnet/Protect\_files\_to\_downloas.aspx\[^\]

          I guess a simple HTTPHandler approach would be better than this. What do you say ?

          All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

          M 1 Reply Last reply
          0
          • N N a v a n e e t h

            Michael Sync wrote:

            If you want the sample, you can check-out this link http://www.codeproject.com/KB/aspnet/Protect\_files\_to\_downloas.aspx\[^\]

            I guess a simple HTTPHandler approach would be better than this. What do you say ?

            All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

            M Offline
            M Offline
            Michael Sync
            wrote on last edited by
            #5

            N a v a n e e t h wrote:

            I guess a simple HTTPHandler approach would be better than this

            Yeah. HTTPHandler is much easier than that. no need to touch the IIS setting and just can be done via web.config. but I haven't tried it before..

            Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

            D 1 Reply Last reply
            0
            • M Michael Sync

              N a v a n e e t h wrote:

              I guess a simple HTTPHandler approach would be better than this

              Yeah. HTTPHandler is much easier than that. no need to touch the IIS setting and just can be done via web.config. but I haven't tried it before..

              Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

              D Offline
              D Offline
              DotNetXenon
              wrote on last edited by
              #6

              Thanks. Took HTTPHandler approach.

              ------------------------------------------------------------ "The only true wisdom is in knowing you know nothing." --Socrates

              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