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
  1. Home
  2. General Programming
  3. Windows API
  4. Vista is blocking incomming networkCommunication (such as tcpListener)

Vista is blocking incomming networkCommunication (such as tcpListener)

Scheduled Pinned Locked Moved Windows API
helpcsharpwcfsysadmintutorial
1 Posts 1 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.
  • M Offline
    M Offline
    Michael Demeersseman
    wrote on last edited by
    #1

    I cannot get TcpListener working under vista (i have the same problem with WCF communication but the example with tcp listener is easier to demonstrate). The following example works when: -Server and client are on the same vista or winxp machine -Server is on winxp and client is on vista the following example doesn't work (and i need it to work) when: -Server is on vista, client is on another machine (vista or winxp) ps:My networking is ok, i can ping the server on vista, all possible firewall stuff is off (i even added the port in the disabled firewall to pass) . As I mentioned before, if i create a wcf application i have the same problem.I hope someone can help me. This is my server: static void Main(string[] args) { //Create a TCP/IP socket. SocketPermission permission = new SocketPermission(NetworkAccess.Accept,TransportType.All,"192.168.2.69",8075); permission.Demand(); TcpListener listener = new TcpListener(IPAddress.Parse("192.168.2.69"), 8075);//yes, i also tried IPAddress.Any listener.Start(); TcpClient client=listener.AcceptTcpClient(); StreamReader reader = new StreamReader(client.GetStream()); string data=""; do{ data = reader.ReadLine(); Console.WriteLine(data); }while (data!="end"); } This is my client: static void Main(string[] args) { TcpClient client = new TcpClient(); client.Connect("192.168.2.69", 8075);//block here StreamWriter writer=new StreamWriter(client.GetStream()); writer.AutoFlush = true; writer.WriteLine("Hello"); writer.WriteLine("end"); }

    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