Network path not found error for local machine
I am testing an application on my local machine to generate a file. The network path I set up for testing \\127.0.0.1\NEWFILE\test1.txt
. I am getting a "network path not found" error. What could be the problem?
filePath = @"\\127.0.0.1\NEWFILE\test1.txt";
File.WriteAllText(filePath, Contents.ToString());
+2
nav100
source
to share
4 answers
Try
filePath = @"\\127.0.0.1\NEWFILE\test1.txt";
File.WriteAllText(filePath, Contents.ToString());
Notice the extra backslash.
EDIT 1
Is NEWFILE a fraction on your computer that your program has write access to?
EDIT 2
Confirm NEWFILE is a share on your computer. Open Windows Explorer and in the address bar \\ 127.0.0.1 \
After entering the last backslash, a list of available beats should appear. If NEWFILE is not one of them, then your problem.
0
source to share