M
Michael Barrett
Hi,
Using C# I need to retrieve a setting from my App.config-file (console
application). The key I need to retrieve is shown below.
<appSettings>
<add key="HtmlString"
value=@"http://ADDRESS.com/opdat.php?name=NAME&domain=DOMAIN&pw=PW&silent=1"
/>
</appSettings>
I use the following code to retrieve the setting.
string htmlString = ConfigurationSettings.AppSettings["HtmlString"];
However, I get a runtime error doing this (ConfigurationException). If I
replace the value in the key with something more simple - such as "Test" for
example, it works fine. This leads me to believe that it somehow is the
composition of the URL that is the problem... But what can I do to solve it?
Thanks in advance.
Using C# I need to retrieve a setting from my App.config-file (console
application). The key I need to retrieve is shown below.
<appSettings>
<add key="HtmlString"
value=@"http://ADDRESS.com/opdat.php?name=NAME&domain=DOMAIN&pw=PW&silent=1"
/>
</appSettings>
I use the following code to retrieve the setting.
string htmlString = ConfigurationSettings.AppSettings["HtmlString"];
However, I get a runtime error doing this (ConfigurationException). If I
replace the value in the key with something more simple - such as "Test" for
example, it works fine. This leads me to believe that it somehow is the
composition of the URL that is the problem... But what can I do to solve it?
Thanks in advance.