locked
Trouble Adding Upnp Port RRS feed

  • Question

  •  


    using System;
    using System.Collections.Generic;
    using System.Text;
    
    namespace upnp
    {
        class Program
        {
            static void Main(string[] args)
            {
                NATUPNPLib.UPnPNATClass upnpnat = new NATUPNPLib.UPnPNATClass();
                NATUPNPLib.IStaticPortMappingCollection mappings = upnpnat.StaticPortMappingCollection;
                
                 //Error Here
                 // PS: My mapping is NOT NULL
                mappings.Add(9604, "TCP", 9604, "192.168.1.102", true, "test");
                Console.Read();
            }
        }
    }
    

     

    An unhandled exception of type 'System.IO.FileNotFoundException' occurred in upnp.exe

    Additional information: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)



    • Edited by RsTylecstAcy- Friday, September 23, 2011 3:05 AM
    • Moved by Leo Liu - MSFT Thursday, September 29, 2011 3:41 AM Off-Topic (From:Visual C# Language)
    Friday, September 23, 2011 3:01 AM

All replies

  • Hi RsTylecstAcy,

    Microsoft does not provide support for any third-party products/libraries.
    Please post in the relevant forum to get specialized support if any.
    I am moving your thread into the Off-Topic Forum shortly.
    Thanks for your understanding.

    Have a nice day,
    Leo Liu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, September 26, 2011 7:45 AM