-
Notifications
You must be signed in to change notification settings - Fork 99
Error when Service control urls have question marks #22
Comments
Thank you very much for reporting these problems. I will fix them asap. About your question, I used it because it worked so far. Believe me that Open.NAT is hard to test because tehre are a lot of different routers out there. I have to check now if it was a bad idea (and remove it) or if there is something wrong in the way Open.NAT is using it (and fix it). I will let you know when it is done and also I would request your help for testing the new version. |
Thank you Lucas for your prompt reply. I will be more than happy to test your new fix. Cheers! |
Hi Lucas, I have another router with DD-WRT. GetAllMappingsAsync failed when the index has exceeded the number of entries in the mapping table. The router returns error 402. So the catch section need to be something like ... Below is the capture from Wireshark. |
Ummm ok. The weird part of this error is that the router doesn't follow the specs, I think. It should fail with a different error code and description. Anyway, it is something that has to be fixed. Thank you for your effort. I am happy to know there is a person with a lot of routers using O.N. ;) |
@at1993 ,
Thank you |
What you say makes sense for me. Empty NewInternalClient, NewInternalPort=0, NewEnabled=0. It seems to be a place holders or templace in the list for the Microsoft Media Server. Moreover, the code fails if NewInternalClient is empty so, I will use your code. |
Hi Lucas, I have a Linksys WRT1900AC. It is not answering to SSDP (M-Search) sent during discovery. UPnp is enabled at the router. Do you have any idea? |
False alarm :) It was the anti-virus thing. Open.NAT is OK for WRT1900AC. I do have a proposal though. I would like to use Open.NAT in one of my application which managed the "Internet of Things". Some of these gadgets needs to be accessible from outside the router. The app will manage the port mappings when necessary. In Open.NAT, the PrivateIP is forced to DeviceInfo.LocalAddress in CreatePortMapAsync. Two things need to be modified as followed.
public Mapping(Protocol protocol, IPAddress privateIP, int privatePort, int publicPort) 2.Check PrivateIP before before setting it to DeviceInfo.LocalAddress public override async Task CreatePortMapAsync(Mapping mapping) |
I think that is not a problem given it does not introduce any breaking change. Let me fix the defects first. |
Done. Defects were fixed and are available for real testing in the BugFixing branch. Could you confirme everything is working correctly now, @at1993 please? |
Hi Lucas, the BugFixing branch works. Thank you very much! |
Ok, I will merge it back to master and generate a new nuget package with these fixes and the new feature for allowing the creation of mappings with arbitrary privateIP. I estimate it can be done on Wednesday. In the meanwhile you can work with your own fork or just wait a couple of days. |
NP. and thank you. |
I should have realized that the same problem would happen in GetSpecificMappingAsync method too. I will fix it in the BugFixing branch today. Thanks for reporting, @at1993 |
Fixed on 790b407 |
When I tested out the ConsoleTest program, I ran into problems at
device.GetExternalIPAsync() on three different routers.
Notice that the UriBuilder replaced the question mark character to %3F. This caused the router to return 404 error.
Solution:
My second problem is in GetAllMappingsAsync, one of my routers (sagemcom vdsl modem/router)
returns mapping entry with internalclient empty. My fix is as follow
Question: Is there a reason to use UriBuilder if it replaces what it considers illegal characters?
The text was updated successfully, but these errors were encountered: