{"action":"created","issue":{"url":"https://api.github.com/repos/lontivero/Open.NAT/issues/26","labels_url":"https://api.github.com/repos/lontivero/Open.NAT/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/lontivero/Open.NAT/issues/26/comments","events_url":"https://api.github.com/repos/lontivero/Open.NAT/issues/26/events","html_url":"https://github.com/lontivero/Open.NAT/issues/26","id":71688867,"number":26,"title":"Error while obtaining my external IP address","user":{"login":"MrPointer","id":10564482,"avatar_url":"https://avatars.githubusercontent.com/u/10564482?v=3","gravatar_id":"","url":"https://api.github.com/users/MrPointer","html_url":"https://github.com/MrPointer","followers_url":"https://api.github.com/users/MrPointer/followers","following_url":"https://api.github.com/users/MrPointer/following{/other_user}","gists_url":"https://api.github.com/users/MrPointer/gists{/gist_id}","starred_url":"https://api.github.com/users/MrPointer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrPointer/subscriptions","organizations_url":"https://api.github.com/users/MrPointer/orgs","repos_url":"https://api.github.com/users/MrPointer/repos","events_url":"https://api.github.com/users/MrPointer/events{/privacy}","received_events_url":"https://api.github.com/users/MrPointer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lontivero/Open.NAT/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"lontivero","id":127973,"avatar_url":"https://avatars.githubusercontent.com/u/127973?v=3","gravatar_id":"","url":"https://api.github.com/users/lontivero","html_url":"https://github.com/lontivero","followers_url":"https://api.github.com/users/lontivero/followers","following_url":"https://api.github.com/users/lontivero/following{/other_user}","gists_url":"https://api.github.com/users/lontivero/gists{/gist_id}","starred_url":"https://api.github.com/users/lontivero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lontivero/subscriptions","organizations_url":"https://api.github.com/users/lontivero/orgs","repos_url":"https://api.github.com/users/lontivero/repos","events_url":"https://api.github.com/users/lontivero/events{/privacy}","received_events_url":"https://api.github.com/users/lontivero/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-04-28T20:06:19Z","updated_at":"2015-04-30T20:24:15Z","closed_at":null,"body":"A week ago I tried the library for the 1st time, so to see if it works OK I ran the official test that @lontivero  has specified, but it failed almost right away.\r\nThe problem occurs to be a bad Http request, in the method GetExternalIPAddressResponse.\r\nHere's a log file I've added to show the exception being thrown along with the built-in tracing:\r\n```\r\n23 Apr 2015 15:02:36\r\nType: System.InvalidOperationException\r\nAbbreviated Message: The response is invalid: GetExternalIPAddressResponse\r\n\r\nFull message: System.InvalidOperationException: The response is invalid: GetExternalIPAddressResponse\r\n   at Open.Nat.ResponseMessageBase.GetNode() in ****\\Open.NAT-master\\Open.NAT-master\\Open.Nat\\Upnp\\ResponseMessageBase.cs:line 55\r\n   at Open.Nat.GetExternalIPAddressResponseMessage..ctor(XmlDocument response, String serviceType) in ****\\Open.NAT-master\\Open.NAT-master\\Open.Nat\\Upnp\\Messages\\Responses\\GetExternalIPAddressResponseMessage.cs:line 39\r\n   at Open.Nat.UpnpNatDevice.<GetExternalIPAsync>d__0.MoveNext() in ****\\Open.NAT-master\\Open.NAT-master\\Open.Nat\\Upnp\\UpnpNatDevice.cs:line 57\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at Open.Nat.ConsoleTest.NatTest.<Test>d__0.MoveNext() in ****\\Open.NAT-master\\Open.NAT-master\\Open.Nat.ConsoleTest\\Main.cs:line 69\r\n\r\nIn: ****\\Open.NAT-master\\Open.NAT-master\\Open.Nat.ConsoleTest\\Main.cs; at: MoveNext; line: 69; column: 17\r\n***************************\r\n\r\nConsole output:\r\n\r\nOpen.NAT - Information > Start Discovery\r\nOpen.NAT - Information > Searching for: UpnpSearcher\r\nOpen.NAT - Verbose > UPnP Response: HTTP/1.1 200 OK\r\nST: urn:schemas-upnp-org:service:WANIPConnection:1\r\nLOCATION: http://10.0.0.138:5000/Public_UPNP_gatedesc.xml\r\nSERVER: Linux/2.6.12, UPnP/1.0, NETGEAR-UPNP/1.0\r\nEXT:\r\nCACHE-CONTROL: max-age=3600\r\nUSN: uuid:8aa1037d-ff05-ae35-3258-ecc39d365000::urn:schemas-upnp-org:service:WAN\r\nIPConnection:1\r\n\r\n\r\nOpen.NAT - Information > UPnP Response: Router advertised a 'urn:schemas-upnp-or\r\ng:service:WANIPConnection:1' service!!!\r\nOpen.NAT - Information > Found device at: http://10.0.0.138:5000/Public_UPNP_gat\r\nedesc.xml\r\nOpen.NAT - Information > 10.0.0.138:5000: Fetching service list\r\nOpen.NAT - Information > Found device at: http://10.0.0.138:5000/Public_UPNP_gat\r\nedesc.xml\r\nOpen.NAT - Information > 10.0.0.138:5000: Parsed services list\r\nOpen.NAT - Information > 10.0.0.138:5000: Found service: urn:schemas-upnp-org:se\r\nrvice:WANIPConnection:1\r\nOpen.NAT - Information > 10.0.0.138:5000: Found upnp service at: /Public_UPNP_C3\r\n\r\nOpen.NAT - Information > 10.0.0.138:5000: Handshake Complete\r\nOpen.NAT - Information > Stop Discovery\r\nOpen.NAT - Verbose > SOAPACTION: **GetExternalIPAddress** url:http://10.0.0.138:\r\n5000/Public_UPNP_C3\r\nOpen.NAT - Verbose > <s:Envelope\r\n   xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\"\r\n   s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\r\n   <s:Body>\r\n      <u:GetExternalIPAddress xmlns:u=\"urn:schemas-upnp-org:service:WANIPConnect\r\nion:1\">\r\n      </u:GetExternalIPAddress>\r\n   </s:Body>\r\n</s:Envelope>\r\n\r\n\r\nOpen.NAT - Verbose > WebException status: ProtocolError\r\nOpen.NAT - Verbose > Response:\r\n<html>\r\n  <head>\r\n    <title>400 Bad Request</title>\r\n  </head>\r\n  <body>\r\n    <h1>400 Bad Request</h1>\r\n    <p>This server does not support the operation requested by your client.</p>\r\n  </body>\r\n</html>\r\n\r\nSocket listening on port 1602. Remember, it is mapped to external port 1702!!!\r\nTest it with http://www.canyouseeme.org/ online tool\r\n```\r\n\r\nI've also tried restarting my router, assigning a static IP address, and using the NATUPnP 1.0 type library, which actually works just fine."},"comment":{"url":"https://api.github.com/repos/lontivero/Open.NAT/issues/comments/97955514","html_url":"https://github.com/lontivero/Open.NAT/issues/26#issuecomment-97955514","issue_url":"https://api.github.com/repos/lontivero/Open.NAT/issues/26","id":97955514,"user":{"login":"lontivero","id":127973,"avatar_url":"https://avatars.githubusercontent.com/u/127973?v=3","gravatar_id":"","url":"https://api.github.com/users/lontivero","html_url":"https://github.com/lontivero","followers_url":"https://api.github.com/users/lontivero/followers","following_url":"https://api.github.com/users/lontivero/following{/other_user}","gists_url":"https://api.github.com/users/lontivero/gists{/gist_id}","starred_url":"https://api.github.com/users/lontivero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lontivero/subscriptions","organizations_url":"https://api.github.com/users/lontivero/orgs","repos_url":"https://api.github.com/users/lontivero/repos","events_url":"https://api.github.com/users/lontivero/events{/privacy}","received_events_url":"https://api.github.com/users/lontivero/received_events","type":"User","site_admin":false},"created_at":"2015-04-30T20:24:15Z","updated_at":"2015-04-30T20:24:15Z","body":"Thank you very much. I can see the router provides two service interfaces:\r\n\r\n    <serviceType>urn:schemas-upnp-org:service:WANIPConnection:1</serviceType>\r\n    <controlURL>/Public_UPNP_C3</controlURL>\r\n\r\nand\r\n\r\n    <serviceType>urn:schemas-upnp-org:service:WANPPPConnection:1</serviceType>\r\n    <controlURL>/Public_UPNP_C5</controlURL>\r\n\r\nOpen.NAT uses the first one and maybe it should try with both. I have to see what the UPnP specs says about this situation."}}