Hi
I am making an application.config file that will hold a path to a file that I save a private key into.
I need this path to be relative but every time I make a relative path it starts me in the bin directory. I need to start outside of this directory.
Like here is the path to the file
I:\Comp7615_Assignment3\App_Code\Assignment3\priva teKey.config
I get this instead
I:\Comp7615_Assignment3\bin\Debug\App_Code\Assignm ent3\privateKey.config
So how can i get it to like about.
I can do it through c# by finding doing something like this:
DirectoryInfo parentDirectory = Directory.GetParent(Directory.GetParent(Applicatio n.StartupPath).ToString());
string documentationPath = parentDirectory.ToString() + @"\Documentation\Source Code Documentation.chm";
but I don't know how to do something like that in an application.config file
this is what I have in my file so
Code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key='keyPath' value='./App_Code/Assignment3/privateKey.config'/>
</appSettings>
</configuration>