This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Urgent: Cannot read static files in Vault Application

I want to add custom json or txt file and want to parse some value from the file on runtime. But unfortunately, I am unable to parse the value. VAF cannot find the directory:

Code Example:

string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "sample.txt");
string data = File.ReadAllText(path);

Error:

The system cannot find the file specified. (Could not find file 'C:\Program Files\M-Files\23.4.12528.8\Bin\x64\sample.txt'.) (0x80070002)
(M-Files 23.4.12528.8 2023-05-17T09:12:15.029Z)

Observation:

In normal c# application, the base directory should point to where the build file of the application is. But in VAF, it is pointing to where M-Files is installed on my machine.

Thanks.

CC:  

Parents
  • This forum is not the place for urgent questions. It is peer to peer support without an SLA. I, for example, am travelling this week and am unable to reply to posts in the way I may at other times. 

    If you need urgent help then I suggest you speak to your Partner Manager about whether they can offer paid support options.

Reply
  • This forum is not the place for urgent questions. It is peer to peer support without an SLA. I, for example, am travelling this week and am unable to reply to posts in the way I may at other times. 

    If you need urgent help then I suggest you speak to your Partner Manager about whether they can offer paid support options.

Children
No Data