'network path translates into local path
I have tried Google and the search function on stackoverflow, but haven't found any helpful info.
I have a server - client program and the path to the document folder in the appsettings on server (it looks like this)
"FileHosting": {
"Staging": "DevTest",
"DevTest": {
"RootDirectory": "\\\\sqlserver\\someFolder",
I check for the RootDirectory via
[HttpGet]
[Route("rootdirectory")]
public IActionResult GetRootDirectory()
{
string staging = configuration["FileHosting:Staging"];
string rootDirectory = configuration[$"FileHosting:{staging}:RootDirectory"];
return Ok(rootDirectory);
}
Every time I ask for the RootDirectory I receive this:
public async Task<string> GetRootDirectoryAsync()
{
var response = await dataStore.ApiClient.GetAsync("api/utility/rootDirectory");
return response.IsSuccessStatusCode ? JsonConvert.DeserializeObject<string>(response.Json) : null;
}
response.Json = "C:\\someFolder\";
As the client runs on another computer, the needed documents are never to be found because of this.
What am I doing wrong? What do I have to do to get geht the relative path instead of some not existing local path?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
