I'm working on a P2P application, and I need to get it to communicate through NAT Routers / Firewalls using UPnP. However, it doesn't seem that the .NET Framework includes support for UPnP.
Is there a UPnP Library for .NET? C# or VB.NET?
UPDATE: I have since found the NATUPnP 1.0 Type Library (NATUPNP.DLL) COM Component that is part of Windows (since Windows XP) that allows you to easily setup/maintain Port Forwarding using UPnP.
I wrote an article with code samples here: .NET Framework: Communicate through NAT Router via UPnP (Universal Plug and Play)
I have a written a fully Managed UPnP library around the microsoft UPnP Control Point COM objects, its available with full source and a demo project, you can download it from CodePlex here:
http://managedupnp.codeplex.com/
It supports full traversal of the UPnP description documents using an object heirachy and among other things is very easy to use.
This Intel UPnP tools have been re-released as open source tools at: http://opentools.homeip.net. The new tools are called the "Developer Tools for UPnP technologies". They are built in C# but there is a free code generator that will output C and C# stacks. The C stack will work on Windows and Linux.
Ylian
Was looking around for this stuff personally and found::
mono-upnp:: https://github.com/mono/mono-upnp
Mono.Nat:: https://github.com/mono/Mono.Nat
There is a COM library that's easy enough to access:
If someone needs an easy library, I wrote a c# class library that uses the UPnPLib COM component. It has some basic functions to open and close ports. I haven't tested it on multiple platforms yet, but it works on Visual Studio 2010 in Windows 7. Feel free to download it at http://sourceforge.net/projects/easyupnp/
Intels UPNP Tools used to be able to export UPnP clients in C#. The suite is deprecated but ought still work.