Search code examples
c#windows-7lanupnp

How to find a specific "UPnP name" on lan using C#?


I am trying to make a program that can detect network cameras connected to the local network. The cameras support UPnP and Bonjour, so it pops up in the Network folder in Windows 7. The only thing a know is the name is gets in this folder.

I thought the easiest way would be to let Windows do the work and just scan through the network folder. But this is no ordinary folder, so how do I do that?

And if that is not possible, how do I find a this camera when I only know the UPnP name? When I scan the IP's on the local network, the host names are given via DHCP, so that can't be used to recognise it.

Hope you have some ideas.

Anders

EDIT: Okay I just found the ManagedUPnP library, which solved my problem. With that I can do the UPnP search myself. But if there is a way to look in the network "folder" from C# I would still like to know:)


Solution

  • Okay I just found the ManagedUPnP library, which solved my problem. With that I can do the UPnP search myself.

    Here a link to managed UPnP, http://managedupnp.codeplex.com/

    Edit 1: Codeplex is being shutdown, but it looks like the project has been forked to here: https://github.com/jogibear9988/ManagedUPnP