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. HELP needed!!

HELP needed!!

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabasehelpquestion
3 Posts 3 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.
  • R Offline
    R Offline
    rizwan_rashid
    wrote on last edited by
    #1

    i m saving path of file (eg D:\abc.pdf)in database.and when i access this path by retrieving it from database and display as hyperlink.. by clicking it doesnt open that file(abc.pdf).but if i store path as (http://localhost/abc.pdf)then it works.anyone plz tell how can i open file stored on C or D...otherthan(localhost)in asp.net

    G P 2 Replies Last reply
    0
    • R rizwan_rashid

      i m saving path of file (eg D:\abc.pdf)in database.and when i access this path by retrieving it from database and display as hyperlink.. by clicking it doesnt open that file(abc.pdf).but if i store path as (http://localhost/abc.pdf)then it works.anyone plz tell how can i open file stored on C or D...otherthan(localhost)in asp.net

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      If the file is stored outside of the web folders, noone but yourself will be able to browse to the file. If you want to give access to the file on the web, you either has to place it inside the web folders (or in a virtual folder), or make a proxy page that reads the file and sends it to the user. Also, using an absolute path like "d:\abc.pdf" will only allow yourself to access the file, even if the path is inside the web folders. --- b { font-weight: normal; }

      1 Reply Last reply
      0
      • R rizwan_rashid

        i m saving path of file (eg D:\abc.pdf)in database.and when i access this path by retrieving it from database and display as hyperlink.. by clicking it doesnt open that file(abc.pdf).but if i store path as (http://localhost/abc.pdf)then it works.anyone plz tell how can i open file stored on C or D...otherthan(localhost)in asp.net

        P Offline
        P Offline
        Prasad Babu A
        wrote on last edited by
        #3

        Hi, I think ur using Server.MapPath() don't use that one. U can use directly those paths. if u use MapPath(), i will goes to ur application path. Bye Pessi.

        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