Last post Dec 05, 2017 01:51 PM by Rockmore
Dec 04, 2017 08:23 PM|Rockmore|LINK
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.
Dec 05, 2017 01:18 AM|bruce (sqlwork.com)|LINK
Dec 05, 2017 01:51 PM|Rockmore|LINK
You were right. My application pool was set to ApplicationPoolIdentity. As soon as I changed it to an account with network permissions it was able to find the needed directory. Thank you for pointing me in the right direction.