UNC path does not work with .NET?

荒凉一梦 提交于 2019-12-05 09:12:06
Mike Zboray

The problem is that \\?\ is a windows API convention that is not supported by .NET. If you read carefully in your link \\?\ does not denote a UNC path, but is a special convention for windows API:

For file I/O, the "\\?\" prefix to a path string tells the Windows APIs to disable all string parsing and to send the string that follows it straight to the file system.

A .NET compatible UNC format would be \\machinename\d$\share\input. See this answer for more info.

The reason it is not supported by .NET is most likely that the extended path convention is not available on all platforms and therefore cannot be guaranteed to work by the framework.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!