Simple issue, I think. Have one automation running .net 461 legacy that I can write to a network path “\\servername\share\file.txt” but another automation that tells me the path is invalid that is running .net5 or higher. What is the correct syntax for a windows file share in dotnet 5?
Hey @jrhalstead
May be try with below options pls…
-
Add only one slash at the beginning
-
Or map the shared to a local drive and then try using the path
Thanks
#nK
If its a network path you need to pass complete UNMAPPED path.
Hi @jrhalstead ,
Please pass the complete path from the root directory till the required location.
Thanks
This is a complete network path. \servername\share. I’m not passing a relative path on the local drive but a network path
Apparently write text file in Windows compatibility (not legacy) doesn’t need to be escaped and in fact, the escaping doesn’t work for network shares. But when I browse for the network share, Studio put that path in fully escaped. So \\\\server\\share doesn’t work but \\server\share does. C:\temp\file.txt works though. Seems like that should be documented somewhere or it’s a bug
stupid escape characters. That last should show c:\\temp\\file.txt
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.