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. need to exit virtual directory

need to exit virtual directory

Scheduled Pinned Locked Moved ASP.NET
helpcsharpasp-netsysadminquestion
2 Posts 2 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.
  • H Offline
    H Offline
    Hanzaplast
    wrote on last edited by
    #1

    I am curently working on asp.net application and her CMS system... This is virtual directory of site: application and CMS have his own virtual directory here application/admin so my question is: can i access first application folders such as: application/images from CMS system which is located in virtual directory application/admin ------------------------------------------------------------------------------------ I was trying this way: Request.Files[0].SaveAs(Server.MapPath("../test.txt")) But this way i should exit virtual directory and get error "Cannot use a leading .. to exit above the top directory." Any help or alternative solution appreciated! Thx in advance....

    C 1 Reply Last reply
    0
    • H Hanzaplast

      I am curently working on asp.net application and her CMS system... This is virtual directory of site: application and CMS have his own virtual directory here application/admin so my question is: can i access first application folders such as: application/images from CMS system which is located in virtual directory application/admin ------------------------------------------------------------------------------------ I was trying this way: Request.Files[0].SaveAs(Server.MapPath("../test.txt")) But this way i should exit virtual directory and get error "Cannot use a leading .. to exit above the top directory." Any help or alternative solution appreciated! Thx in advance....

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      MapPath is assuming that you're starting at the top level, not at your current one. So, don't do the . thing, specify the full path.

      Christian Graus Driven to the arms of OSX by Vista.

      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