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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Acces to a mapped network drive.

Acces to a mapped network drive.

Scheduled Pinned Locked Moved C#
sysadminhelpquestion
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.
  • S Offline
    S Offline
    Stephen_Mc
    wrote on last edited by
    #1

    Hi All, I have a program that wants to access a mapped network drive. When the program starts up it checks to see if the directory exists and then grabs the file. The problem is that when i turn on my computer and start programming this bit of code does not work until I open up windows explorer and click on the drive. Once I have done this then the code works fine. Is there a solution to 'wake' the mapped drive so that I have access to it? Thanks in advance. Stephen

    S 1 Reply Last reply
    0
    • S Stephen_Mc

      Hi All, I have a program that wants to access a mapped network drive. When the program starts up it checks to see if the directory exists and then grabs the file. The problem is that when i turn on my computer and start programming this bit of code does not work until I open up windows explorer and click on the drive. Once I have done this then the code works fine. Is there a solution to 'wake' the mapped drive so that I have access to it? Thanks in advance. Stephen

      S Offline
      S Offline
      Stephan Samuel
      wrote on last edited by
      #2

      Stephen, Your problem isn't so much that it's sleeping, but rather that you're missing two steps that Explorer does: NetBIOS browsing and authentication. You may be able to avoid browsing if you're on an AD domain, but the authentication doesn't happen on its own. For one, try accessing the machine from its UNC path (something like \\machinename\share\folder) instead of as a mapped drive. Drive letters are a vicious hack left in only for backwards compatability to the DOS days and for marketing/sales folks. If that falls short, look at some of the documentation for the Linux SAMBA project. There are some pretty clear and simple descriptions there of exactly what steps happen when you double-click on a mapped drive.

      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