FileSystemWatcher Fails to access network drive

后端 未结 7 2251
春和景丽
春和景丽 2020-11-27 23:12

I am trying to run a file watcher over some server path using windows service. I am using my windows login credential to run the service, and am able to access this \"someSe

7条回答
  •  遥遥无期
    2020-11-27 23:28

    Even though this is already answered I thought I would put in my two cents worth becaus eyou can see this same error even if you supply valid paths.

    You will get the same error when the process running the watcher does not have access to the remote share. This will happen if the watcher is in a service running under the System account and the share is created by a user. System does not have access to that share and wont recognize it, you will need to impersonate the user to get access to it.

提交回复
热议问题