I'm fairly new to networking and lidgren has made it much easier for me to begin adding multiplayer capability to my XNA PC game. I've been testing across the network setting up my laptop right next to me and it has been working great. The problem is I sent a copy of my game to a friend in the Netherlands and she cannot connect to me. I have it set up to where one person is the host and other people are clients who connect to that host.
The host sets up the server as follows:
Config = new NetPeerConfiguration("game");
Config.Port = 14242;
Config.EnableUPnP = true;
Config.MaximumConnections = 3;
Config.EnableMessageType(NetIncomingMessageType.ConnectionApproval);
Server = new NetServer(Config);
Server.Start();
Server.UPnP.ForwardPort(14242, "Forlorn Forest");
Here's the exception ForwardPort throws as it fails and gives "Bad Request":
And two web exceptions that are thrown:
It says something about the connection being closed by the remote host and unable to read data from the transport connection in the exception details:
Any thoughts as to what might be going on here? UPnP is enabled on my router. I've taken a look at network traffic with WireShark and I can see it display malformed packets though I didn't mess with any of the Lidgren code so I'm not sure why it would.