I had a requirement of reading a XML document from the server on which the application is running. I am able to do it by simply accessing a file by passing string url as the parameter.
XmlDocument doc = new XmlDocument();
doc.Load(fullPath); //fullPath is a string. for e.x. c:\myfolder\myxml.xml
Now the requirement changes to access the file from a different server so for that I am simply modifying my fullPath
as
\\p.o.r.t\c$\myfolder\myxml.xml
But it fails to read the file. Is there some other way to access files placed on a different server.
P.S.: If I use the same URL and paste it in URL, I am able to access the file.