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. Network problem

Network problem

Scheduled Pinned Locked Moved C#
sysadminquestionhelplounge
4 Posts 3 Posters 0 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
    snouto
    wrote on last edited by
    #1

    iam building chat application.It connects will in LAN between networked PC(s) && also successful in connection on my own localhost on the same pc . But the Problem is That when i gave my friend the client application and ran my server. I gave him then my ip address . But it can't connect to my ip address whereas iam running my server application so well iam not firewalled also . Iam using dial up and he is using dial up also. I tested it with one of my friends using DSL but the problem is the same. How can i make it connect to any user on the internet by knowing his ip address and port assume that they are not behind firewall or NAT's or anything ? Human Knowledge Belongs To the world

    C M 2 Replies Last reply
    0
    • S snouto

      iam building chat application.It connects will in LAN between networked PC(s) && also successful in connection on my own localhost on the same pc . But the Problem is That when i gave my friend the client application and ran my server. I gave him then my ip address . But it can't connect to my ip address whereas iam running my server application so well iam not firewalled also . Iam using dial up and he is using dial up also. I tested it with one of my friends using DSL but the problem is the same. How can i make it connect to any user on the internet by knowing his ip address and port assume that they are not behind firewall or NAT's or anything ? Human Knowledge Belongs To the world

      C Offline
      C Offline
      c guy3811
      wrote on last edited by
      #2

      First, make sure that your server isnt listening on "127.0.0.1". While this will work for your computer (localhost), no one else will be able to connect to it. Next, try getting an IPAddress from Dns.Resolve(Environment.MachineName).AddressList[0]. This will enable your server to listen on the correct address for any computer you place it on. Then you just have to give whoever else the IP Address of your server so they connect, and it SHOULD fix your problem. If it still doesnt, try checking your Windows Firewall. C#Guy

      1 Reply Last reply
      0
      • S snouto

        iam building chat application.It connects will in LAN between networked PC(s) && also successful in connection on my own localhost on the same pc . But the Problem is That when i gave my friend the client application and ran my server. I gave him then my ip address . But it can't connect to my ip address whereas iam running my server application so well iam not firewalled also . Iam using dial up and he is using dial up also. I tested it with one of my friends using DSL but the problem is the same. How can i make it connect to any user on the internet by knowing his ip address and port assume that they are not behind firewall or NAT's or anything ? Human Knowledge Belongs To the world

        M Offline
        M Offline
        mcljava
        wrote on last edited by
        #3

        So it works fine on your LAN. You client has a DHCP address and your server has a static IP correct? Well your static IP is visible on your LAN but not on the WAN. Your dialup ISP probably can if not already assign you a static IP. The WAN IP is gloablly accessible (i.e. via the Internet). Inside your premise (house) you will also have to setup routing so that the PORT your chat server is running on can have public data routed to it. For example if you have a Linksys Router check out Advanced->Port Forwarding. For testing, if you can dialup and then connect to the public IP / Port then you should be in good shape. However until you get to the point where you can connect, tell you friends to hold off. Good luck Mike Luster

        S 1 Reply Last reply
        0
        • M mcljava

          So it works fine on your LAN. You client has a DHCP address and your server has a static IP correct? Well your static IP is visible on your LAN but not on the WAN. Your dialup ISP probably can if not already assign you a static IP. The WAN IP is gloablly accessible (i.e. via the Internet). Inside your premise (house) you will also have to setup routing so that the PORT your chat server is running on can have public data routed to it. For example if you have a Linksys Router check out Advanced->Port Forwarding. For testing, if you can dialup and then connect to the public IP / Port then you should be in good shape. However until you get to the point where you can connect, tell you friends to hold off. Good luck Mike Luster

          S Offline
          S Offline
          snouto
          wrote on last edited by
          #4

          So what do i have to do to make my friends connect to me !!! and i want to be able to connect to any ip address on the internet by knowing the ip address and the port number ???? like any remote administration tool like subseven or prorat or any others how could they do that ? i need clients in voice session , the voice is directed to each one pc without the interfere of the server it will be so heavy for the server to handle text and voice at the same time Mess With The Best And Die Like The Rest

          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