Accessing a file on a network drive

前端 未结 2 1341
抹茶落季
抹茶落季 2021-02-05 17:58

Background: I have an application that has to read from files on a network drive (Z:)

This works great in my office domain, however it does not work on

相关标签:
2条回答
  • 2021-02-05 18:39

    This might sound stupid but have you attempted to change the way you are accessing the drive? Maybe install some form of virtual handler which lets you view information on the drive. SSH for instance?

    0 讨论(0)
  • 2021-02-05 18:55

    Some thoughts:

    • Do not use logical drive paths to access network resources from code. Always use UNC paths (e.g. \\SERVER\Share\Filename.ext).
    • Enable auditing of Logon/Logoff events from your local security policy so that when you call the Impersonate method, you can track the failure/success in great detail
    • You would be best to create an account in your own domain that has the same username and password as an account in the other domain. Authenticate off your domain and pass-through authentication will give you access to the network share on the other domain.
    0 讨论(0)
提交回复
热议问题