I'm wanting to use an app.config file to set the port and IpAddress for a custom server. The problem is that I can't seem to get the Ip into the program.
Here is my code...
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="port" value="500" />
<add key="ipadd" value ="173.31.1.125" />
</appSettings>
</configuration>
here is how I am trying to use it....
System.Net.IPAddress localhost = System.Net.IPAddress.Parse(System.Configuration.Co nfigurationSettings.AppSettings["ipadd"]);
localhost.Start();
Here is the error....
The requested address is not valid in its context
What do I need to do?