accncc / lidgren-network-gen3

Automatically exported from code.google.com/p/lidgren-network-gen3
0 stars 0 forks source link

UPnP never succeeds #78

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start a NetPeer
2. Call peer.UPnP.ForwardPort(Port, "Something");
3. SOAPRequest call in ForwardPort always throws a WebException (The underlying 
connection was closed: The connection was closed unexpectedly)

What is the expected output? What do you see instead?
I expect this to map a port, instead I see it always failing. My router *does* 
support UPnP

What version of the product are you using? On what operating system?
Latest from the SVN on Windows 7 Home premium

Original issue reported on code.google.com by martinde...@gmail.com on 18 Jul 2011 at 8:04

GoogleCodeExporter commented 9 years ago
Do you have UPnP turned on? It's usually disabled by default.

Original comment by lidg...@gmail.com on 18 Jul 2011 at 8:49

GoogleCodeExporter commented 9 years ago
Yep, the configuration is setup with:

new NetPeerConfiguration("Name"){ EnableUPnP = true }

Original comment by martinde...@gmail.com on 18 Jul 2011 at 8:51

GoogleCodeExporter commented 9 years ago
No, I mean, is it turned on in your router? It's could be disabled by default 
in the router software.

Original comment by lidg...@gmail.com on 18 Jul 2011 at 8:57

GoogleCodeExporter commented 9 years ago
Oh right, yes it is, the checkbox "Turn UPnP On" is checked

Original comment by martinde...@gmail.com on 18 Jul 2011 at 9:10

GoogleCodeExporter commented 9 years ago
Difficult to tell what can be the problem without access to your hardware. Try 
debugging... does it successfully retrieve the service url? What does it say? 
Can you try an UPnP tester 
(http://www.softpedia.com/get/System/System-Miscellaneous/UPnP-Test.shtml or 
similar). 

Original comment by lidg...@gmail.com on 18 Jul 2011 at 9:15

GoogleCodeExporter commented 9 years ago
Server url is retrieved as http://192.168.0.1:5000/Public_UPNP_C3, which is the 
correct IP for my router.

However, the UPnP test you suggested fails on everything except "Operating 
System Support". Which is odd, as I understand the Lidgren code it wouldn't 
retrieve a server URL if there wasn't a UPnP device around?

Original comment by martinde...@gmail.com on 18 Jul 2011 at 9:20

GoogleCodeExporter commented 9 years ago
Lidgren does not test any availability before trying to fetch a service url; it 
considers the fetching a test in itself.
It seems your router is somewhat ambivalent in supporting UPnP; it supplies a 
service url which suggests it can do it, but does not appear to support it 
otherwise. Could be a version issue or something; difficult to tell.
I'm going to close the issue since there's really nothing I can do without 
access to your hardware - if you can debug the issue and suggest a change to 
the library, reopen the issue and we'll have a look again.

Original comment by lidg...@gmail.com on 20 Jul 2011 at 8:47