Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. How to get network connection name

How to get network connection name

Scheduled Pinned Locked Moved C#
tutorialsysadminworkspace
6 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    s196675m
    wrote on last edited by
    #1

    When I open the network connection from the control panel, I can see several connecton for differnt network interface. example "Local Area connection"; I want to get this connection name == "Local Area connection" == programatically. For local machine it is possible using NetworkInterface Class but I am trying to get it for a remote machine. NetworkInterface class can not used for remote machine. I used WMI for remote machine connection configuration but I am able to get all related information for any interface but no property is found in Win32_NetworkAdapterConfiguration class which is directly related to my requirement. Caption, Name, and other property gives me some other information but not the thing I am looking for. Any idea, hint will be helpful. Thank you

    P D 2 Replies Last reply
    0
    • S s196675m

      When I open the network connection from the control panel, I can see several connecton for differnt network interface. example "Local Area connection"; I want to get this connection name == "Local Area connection" == programatically. For local machine it is possible using NetworkInterface Class but I am trying to get it for a remote machine. NetworkInterface class can not used for remote machine. I used WMI for remote machine connection configuration but I am able to get all related information for any interface but no property is found in Win32_NetworkAdapterConfiguration class which is directly related to my requirement. Caption, Name, and other property gives me some other information but not the thing I am looking for. Any idea, hint will be helpful. Thank you

      P Offline
      P Offline
      Patrick_N3WB1E
      wrote on last edited by
      #2

      Cant you just do a file load and put the file of the Local Area Connection into your program, ive dont that for my internet debugger thing :P that might i work, i might be able to help you though.

      D 1 Reply Last reply
      0
      • S s196675m

        When I open the network connection from the control panel, I can see several connecton for differnt network interface. example "Local Area connection"; I want to get this connection name == "Local Area connection" == programatically. For local machine it is possible using NetworkInterface Class but I am trying to get it for a remote machine. NetworkInterface class can not used for remote machine. I used WMI for remote machine connection configuration but I am able to get all related information for any interface but no property is found in Win32_NetworkAdapterConfiguration class which is directly related to my requirement. Caption, Name, and other property gives me some other information but not the thing I am looking for. Any idea, hint will be helpful. Thank you

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        s196675m wrote:

        I used WMI for remote machine connection configuration but I am able to get all related information for any interface but no property is found in Win32_NetworkAdapterConfiguration class which is directly related to my requirement.

        Did you look at the WMI Win32_NetworkAdapter class??

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008

        S 2 Replies Last reply
        0
        • P Patrick_N3WB1E

          Cant you just do a file load and put the file of the Local Area Connection into your program, ive dont that for my internet debugger thing :P that might i work, i might be able to help you though.

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          Patrick_N3WB1E wrote:

          Cant you just do a file load and put the file of the Local Area Connection into your program,

          Uhhh...would you care to explain what you mean by this?? A "file load" to get an adapter name?? :wtf:

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007, 2008

          1 Reply Last reply
          0
          • D Dave Kreskowiak

            s196675m wrote:

            I used WMI for remote machine connection configuration but I am able to get all related information for any interface but no property is found in Win32_NetworkAdapterConfiguration class which is directly related to my requirement.

            Did you look at the WMI Win32_NetworkAdapter class??

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007, 2008

            S Offline
            S Offline
            s196675m
            wrote on last edited by
            #5

            Yes, I did. Thanks

            1 Reply Last reply
            0
            • D Dave Kreskowiak

              s196675m wrote:

              I used WMI for remote machine connection configuration but I am able to get all related information for any interface but no property is found in Win32_NetworkAdapterConfiguration class which is directly related to my requirement.

              Did you look at the WMI Win32_NetworkAdapter class??

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                   2006, 2007, 2008

              S Offline
              S Offline
              s196675m
              wrote on last edited by
              #6

              Yes, I did and I have found the property. Unfortunately I overlooked this property in my previous investigation. The Property name is "NetConnectionID" of "Win32_NetworkAdapter" class. Thank you

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups