1
Answer

app.config file path with space

Baris Turkoglu

Baris Turkoglu

12y
4.9k
1
Hello

I have a app.config file and one of the parameters in there is a path to the filelistener folder.
The problem is that the path to this folder contains space in it, and it doesn't want to take it. I've tried to put the following:

<add key="WatchPath" value="G:\Data\Salg & Logistik\DMR FILEDROP\" />

<add key="WatchPath" value="G:\\Data\\Salg & Logistik\\DMR FILEDROP\\" />

<add key="WatchPath" value=@"G:\Data\Salg & Logistik\DMR FILEDROP\" />

When I was developing the program, I put the watchpath to this:

<add key="WatchPath" value="c:\\temp\\watch_directory\\" />

And it worked like a charm ... but on the server where the service is going to run, the path contains spaces .. :(

can someone help?!

Best regards
Baris


Answers (1)