I wasn't sure where to post this so mods / admin feel free to move to the correct section if you need to.

Took me a couple of hours on and off to figure why things wouldn't work but finally got it... it's from the serverlist.cs file that was causing the problems for a connection. Mine is an older version of the server list file and had this in it..




Code:
        private static IPAddress FindPublicAddress()
        {
            try {
                WebRequest req = HttpWebRequest.Create( "http://www.runuo.com/ip.php" );
                req.Timeout = 15000;

                WebResponse res = req.GetResponse();

                Stream s = res.GetResponseStream();

                StreamReader sr = new StreamReader( s );

                IPAddress ip = IPAddress.Parse( sr.ReadLine() );

                sr.Close();
                s.Close();
                res.Close();

                return ip;
            } catch {
                return null;
            }
        }

This bit...

WebRequest req = HttpWebRequest.Create( "http://www.runuo.com/ip.php" );

is looking for the runuo site which aint there any more... what a head ache tonight lol ;)

Just letting you know in case others hit a problem with it.
 
Ah based on what the imputed website would read it is?

so if I "pinged" ServUO at EXAMPLE 127.0.0.9 it would then use that number?

Just learning :)
 
Well the line of code you quoted above is creating an object from the class WebRequest. using that object later in the code it uses methods from the WebRequest class to request data from the provided address. It just so happens in this case that the address data contains your IP Address (you can see so at http://services.servuo.com/ip.php) which is then read from the stream and tells the server what the IP to use is.

If you visited the above address on any PC it would show that PC's public IP. Though, to be pedantic it would never be 127.0.0.9 as the 127.0.0.0/8 (Any IP matching the pattern 127.x.x.x) IP block is a reserved one that is used for loopback addresses. I.E local IP's only, not public internet accessible ones.
 
Back