Go Back   RunUO - Ultima Online Emulation > RunUO > New Join Forum

New Join Forum So your new to RunUO and looking to work with people that are new, this is the place.

Reply
 
Thread Tools Display Modes
Old 01-19-2007, 03:58 PM   #1 (permalink)
Forum Novice
 
frango9000's Avatar
 
Join Date: Jun 2003
Location: Caracas, Venezuela
Age: 21
Posts: 137
Send a message via MSN to frango9000
Default Conection Problems...

Hello, i just migrated to 2.0 RC1 and i have a problem when i conect to server... well actually it only happens when i conect to the server from the same computer that i use to host it, when i use another computer it doesnt happen..the error will close the server console an leave me with this crash message

Quote:
Server Crash Report
===================

RunUO Version 2.0, Build 2357.32527
Operating System: Microsoft Windows NT 6.0.6000.0
.NET Framework: 2.0.50727.312
Time: 19/01/2007 03:43:33 p.m.
Mobiles: 1847
Items: 99208
Clients:
- Count: 1
+ 201.211.150.28: (account = theman)

Exception:
System.Net.Sockets.SocketException: The attempted operation is not supported for the type of object referenced
at System.Net.IPAddress.get_Address()
at Server.Network.AccountLoginAck..ctor(ServerInfo[] info)
at Server.Network.PacketHandlers.AccountLogin_ReplyAc k(NetState state)
at Server.Network.MessagePump.HandleReceive(NetState ns)
at Server.Network.MessagePump.Slice()
at Server.Core.Main(String[] args)
please help me =D
frango9000 is offline   Reply With Quote
Old 01-19-2007, 04:02 PM   #2 (permalink)
Master of the Internet
 
Join Date: Oct 2005
Age: 45
Posts: 6,283
Default

What did you do to your Serverlist.cs?
Malaperth is offline   Reply With Quote
Old 01-19-2007, 04:18 PM   #3 (permalink)
Forum Novice
 
frango9000's Avatar
 
Join Date: Jun 2003
Location: Caracas, Venezuela
Age: 21
Posts: 137
Send a message via MSN to frango9000
Post

weel i changed the name of the server and changed so it coneccts to greenice.servegame.com which is the dns but i dont thinks that is the problem because it also happens with a fresh runuo with absolutly no modifications... btw i had the same problem when i conected from another computer to the ip the way so solve that was with the dns... heres my serverlost.cs:
Code:
using System;
using System.Net;
using System.Net.Sockets;
using Server;
using Server.Network;

namespace Server.Misc
{
	public class ServerList
	{
		/* Address:
		 * 
		 * The default setting, a value of 'null', will attempt to detect your IP address automatically:
		 * private const string Address = null;
		 * 
		 * This detection, however, does not work for servers behind routers. If you're running behind a router, put in your IP:
		 * private const string Address = "12.34.56.78";
		 * 
		 * If you need to resolve a DNS host name, you can do that too:
		 * private const string Address = "shard.host.com";
		 */

		private const string Address = "greenice.servegame.com";

		public const string ServerName = "Green Ice";

		public static void Initialize()
		{
			Listener.Port = 2593;

			EventSink.ServerList += new ServerListEventHandler( EventSink_ServerList );
		}

		public static void EventSink_ServerList( ServerListEventArgs e )
		{
			try
			{
				IPAddress ipAddr;

				if ( Resolve( Address != null && !IsLocalMachine( e.State ) ? Address : Dns.GetHostName(), out ipAddr ) )
					e.AddServer( ServerName, new IPEndPoint( ipAddr, Listener.Port ) );
				else
					e.Rejected = true;
			}
			catch
			{
				e.Rejected = true;
			}
		}

		public static bool Resolve( string addr, out IPAddress outValue )
		{

            if ( IPAddress.TryParse( addr, out outValue ) )
                return true;

			try
			{
				IPHostEntry iphe = Dns.GetHostEntry( addr );

				if ( iphe.AddressList.Length > 0 )
				{
					outValue = iphe.AddressList[iphe.AddressList.Length - 1];
					return true;
				}
			}
			catch
			{
			}

			outValue = IPAddress.None;
			return false;
		}

		private static bool IsLocalMachine( NetState state )
		{
			Socket sock = state.Socket;

			IPAddress theirAddress = ((IPEndPoint)sock.RemoteEndPoint).Address;

			if ( IPAddress.IsLoopback( theirAddress ) )
				return true;

			bool contains = false;

			IPHostEntry iphe = Dns.GetHostEntry( Dns.GetHostName() );

			for ( int i = 0; !contains && i < iphe.AddressList.Length; ++i )
				contains = theirAddress.Equals( iphe.AddressList[i] );

			return contains;
		}
	}
}
frango9000 is offline   Reply With Quote
Old 01-19-2007, 04:23 PM   #4 (permalink)
Forum Novice
 
frango9000's Avatar
 
Join Date: Jun 2003
Location: Caracas, Venezuela
Age: 21
Posts: 137
Send a message via MSN to frango9000
Default

I can conect from any computer anyway (dns or ip) but i cant conect from the server computer... it crashes (i tried 127.0.0.1, the ip, the dns)
frango9000 is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5