Yortw / RSSDP

Really Simple Service Discovery Protocol - a 100% .Net implementation of the SSDP protocol for publishing custom/basic devices, and discovering all device types on a network.
http://yortw.github.io/RSSDP/
MIT License
282 stars 66 forks source link

Discovery not showing in Explorer (Windows 10) #82

Closed RoySalisbury closed 6 years ago

RoySalisbury commented 6 years ago

I know this has been reported before and there is an FAQ on the subject, but not matter hat I do, I cant get Windows Networking to show my device.

I know the devicedocument.xml needs to be available, and it is, but its never being requested.

Here is my device:

_rootDevice = new SsdpRootDevice() { CacheLifetime = TimeSpan.FromMinutes(5), Location = new Uri("http://localhost:5000/descriptiondocument.xml"), DeviceType = "Basic", DeviceTypeNamespace = "schemas-upnp-org", DeviceVersion = 1, FriendlyName = "MyDevice", SerialNumber = "123456", Manufacturer = "My Manufacturer", ManufacturerUrl = new Uri("http://localhost:5000"), ModelName = "My Model", ModelDescription = "My Model Description",

   Uuid = "950E74FA-1997-4864-81AD-4D3ECA8841E7",
   UrlBase = new Uri("http://localhost:5000"),

};

// I put a breakpoint here, get the document xml, and put it in the .xml file on the web server (itself) string x = _rootDevice.ToDescriptionDocument();

_publisher = new SsdpDevicePublisher() { StandardsMode = SsdpStandardsMode.Relaxed }; _publisher.AddDevice(_rootDevice);

Anyone see anything wrong?

RoySalisbury commented 6 years ago

As it seems is always the case .. after spending 8 hours trying to figure it out .. I found the issue after posting a message.

LOCALHOST does not work. Use the actual machine IP address and it shows up.

Might add that to the FAQ for others.

Roy

Yortw commented 6 years ago

Ah, yeah, great tip. Thanks! I will find some time to update the FAQ tonight perhaps. LocalHost is generally a bad idea because any client using that URL is going to request the document from itself which won't work... unless it's the same machine. It should work if it's on the same machine AFAIK, but maybe there's some other blocker in that case.

Thanks for letting me know you'd solved it.