FileSystemWatcher Fails to access network drive

后端 未结 7 2270
春和景丽
春和景丽 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:23

    With regards to the updated question, I agree that you probably need to specify a valid share, rather than just the remote server name.

    [Update] Fixed previous question about the exception with this:

    specify the name as @"\\someServerPath"

    The \ is being escaped as a single \

    When you prefix the string with an @ symbol, it doesn't process the escape sequences.

提交回复
热议问题