Closed RoySalisbury closed 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
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.
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",
};
// 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?