Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

.net core 2.0 - access file on one server from another server.

$
0
0

I'm sorry if this has been asked before. I just cannot seem to find anything.

In my .net core 2.0 project I have it running on IIS on one server (utvm06-06). When the project runs it needs to access an xml file on a different server. (utvm09-15).

This is the code on utvm06-06 where I try and load the file using the path to utvm09-15.

string path = @"\\utvm09-15\LoaderHome\CaeTools.xml";
XDocument caeToolsDocument = XDocument.Load(path);

However it results in an error:

FileNotFoundException: Could not find file: \\utvm09-15\LoaderHome\CaeTools.xml

Coping that path in Windows Explorer on utvm06-06 I can see and access the file from utvm09-15. The directory on utvm09-15 is shared and it appears to have all the correct permissions. But when I run the program the file can't be found. I am not sure how to fix this issue.

Thank you for any help anyone can give me. 


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>