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. C#
  4. Problem with connection to Socket

Problem with connection to Socket

Scheduled Pinned Locked Moved C#
helpcom
3 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.
  • G Offline
    G Offline
    gottimukkala
    wrote on last edited by
    #1

    Hi I need to validate the email addresses to check if they are existing or not. I used the following code to check first for the validation of domain but it failed with the following exception : A connection attempt failed because the connected party did not properly respond after a certain period of time, or established connection failed because conencted host has failed to respond 209.85.135.17:25 Here I used 25 port but is that port valid or i have to use someother port.

    string address = "test@g.com";
    string[] host = (address.Split('@'));
    string hostname = host[1];

    IPHostEntry IPhst = Dns.Resolve(hostname);
    IPEndPoint endPt = new IPEndPoint(IPhst.AddressList[0], 25);
    Socket s= new Socket(endPt.AddressFamily,
    SocketType.Stream,ProtocolType.Tcp);
    s.Connect(endPt);

    Can anyone please help me. Any Ideas please!! I need it urgently. Thanks in advance,

    -- http://ashakthi.blogspot.com http://kids-articles.blogspot.com

    R A 2 Replies Last reply
    0
    • G gottimukkala

      Hi I need to validate the email addresses to check if they are existing or not. I used the following code to check first for the validation of domain but it failed with the following exception : A connection attempt failed because the connected party did not properly respond after a certain period of time, or established connection failed because conencted host has failed to respond 209.85.135.17:25 Here I used 25 port but is that port valid or i have to use someother port.

      string address = "test@g.com";
      string[] host = (address.Split('@'));
      string hostname = host[1];

      IPHostEntry IPhst = Dns.Resolve(hostname);
      IPEndPoint endPt = new IPEndPoint(IPhst.AddressList[0], 25);
      Socket s= new Socket(endPt.AddressFamily,
      SocketType.Stream,ProtocolType.Tcp);
      s.Connect(endPt);

      Can anyone please help me. Any Ideas please!! I need it urgently. Thanks in advance,

      -- http://ashakthi.blogspot.com http://kids-articles.blogspot.com

      R Offline
      R Offline
      Rozis
      wrote on last edited by
      #2

      In my country many providers block port 25 to reduce spam. tried another?

      1 Reply Last reply
      0
      • G gottimukkala

        Hi I need to validate the email addresses to check if they are existing or not. I used the following code to check first for the validation of domain but it failed with the following exception : A connection attempt failed because the connected party did not properly respond after a certain period of time, or established connection failed because conencted host has failed to respond 209.85.135.17:25 Here I used 25 port but is that port valid or i have to use someother port.

        string address = "test@g.com";
        string[] host = (address.Split('@'));
        string hostname = host[1];

        IPHostEntry IPhst = Dns.Resolve(hostname);
        IPEndPoint endPt = new IPEndPoint(IPhst.AddressList[0], 25);
        Socket s= new Socket(endPt.AddressFamily,
        SocketType.Stream,ProtocolType.Tcp);
        s.Connect(endPt);

        Can anyone please help me. Any Ideas please!! I need it urgently. Thanks in advance,

        -- http://ashakthi.blogspot.com http://kids-articles.blogspot.com

        A Offline
        A Offline
        Abhinav S
        wrote on last edited by
        #3

        This will also depend on the firewall settings on your network setting etc.

        Now...bring me that horizon. And really bad eggs...Drink up me hearties, YO HO!

        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