Ashish Rathi

Ashish Rathi

  • 1.5k
  • 465
  • 8.6k

Microservices: How to set network path of folder structure

Feb 28 2018 4:20 AM

Currently I am using 1. Windows 7 2. Docker Toolbox 3. Visual studio 2017 4. Asp.net core 2.0 Web API

Problem:- First I have created an asp.net core 2.0 web API, which uses a physical path for reading files. It was running perfectly before hosting it to docker. Then I have enabled support for Docker, build and run the image. When i try to hit the URL it is giving me exception that "could not find the part of path"

You can see How I declared a path here. Is that right way to do this? Or do I need to make some changes to dockerfile?

 
private readonly string _networkPath = Directory.GetCurrentDirectory() + @"\TestData\daba"; 

Brought to you by:

Answers (2)