I’m trying to get the key that was added to the app settings in web.config file :
<add key="ComponentXML" value="~/App_Data/Components.XML"/>
and i’m trying to retrieve the value in this manner:
string componentsXMLFile = "ComponentXML";
ConfigurationManager.AppSettings[componentsXMLFile ]);
But it is freaking out:
Could not find a part of the path 'c:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\~\App_Data\Components.XML
which is not at all part of my project folder, it is referring to something else
how can i solve this ? I’m stuck with this problem from past 3 hours.
Please help me
Thanks in anticipation
This code resides in the asp.net web page and this line did the trick for me.
I found the source of answer from here after some more googling.
Thanks