TcpClient and SocketException

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Julien

    TcpClient and SocketException

    Hi,

    I am developing a C# application to send requests to mail server to check
    email addresses validity. I use a TcpClient object to connect to it with the
    Connect(String hostname, Int32 port) method.
    When I use my application at home I don't have any problem to connect and
    get responses but when I try at work, I get the SocketException number 10061
    : "target machine actively refused it". I don't have any proxy, maybe a
    firewall.

    My question is to know if there is another way to connect the servers (same
    problem with sockets) or if there are existing parameters of the TcpClient
    object to connect thru a firewall...

    Thanks
  • Bela Istok

    #2
    Re: TcpClient and SocketException

    Hello Julien, As far I know, there is no way to do this, you need to open
    the port in the firewall to do the connection.

    Regards,

    Bela Istok
    "Julien" <Julien@discuss ions.microsoft. comwrote in message
    news:CC8344BA-DC6B-453F-91E4-D78641E623E8@mi crosoft.com...
    Hi,
    >
    I am developing a C# application to send requests to mail server to check
    email addresses validity. I use a TcpClient object to connect to it with
    the
    Connect(String hostname, Int32 port) method.
    When I use my application at home I don't have any problem to connect and
    get responses but when I try at work, I get the SocketException number
    10061
    : "target machine actively refused it". I don't have any proxy, maybe a
    firewall.
    >
    My question is to know if there is another way to connect the servers
    (same
    problem with sockets) or if there are existing parameters of the TcpClient
    object to connect thru a firewall...
    >
    Thanks

    Comment

    • Hadi Hariri

      #3
      Re: TcpClient and SocketException

      Julien

      Sounds like you are not permitted to make a connection on the SMTP port
      (normally 25) due to firewall restrictions.



      --


      Comment

      • Julien

        #4
        Re: TcpClient and SocketException

        It's what I was thinking :\

        Just another point, when I use email verifier softwares from this network,
        it is working. So it could possible to do it !?


        "Hadi Hariri" wrote:
        Julien
        >
        Sounds like you are not permitted to make a connection on the SMTP port
        (normally 25) due to firewall restrictions.
        >
        >
        >
        --


        >

        Comment

        • Hadi Hariri

          #5
          Re: TcpClient and SocketException

          Julien wrote:
          It's what I was thinking :\
          >
          Just another point, when I use email verifier softwares from this
          network, it is working. So it could possible to do it !?
          >
          >
          How does th email verifier work?

          --


          Comment

          • Julien

            #6
            Re: TcpClient and SocketException

            I don't know but it should connect on the remote smtp server !?


            "Hadi Hariri" wrote:
            Julien wrote:
            >
            It's what I was thinking :\

            Just another point, when I use email verifier softwares from this
            network, it is working. So it could possible to do it !?
            >
            How does th email verifier work?
            >
            --


            >

            Comment

            • Hadi Hariri

              #7
              Re: TcpClient and SocketException

              Well what do you define by verified by email? Normally to allow
              relaying (not really connection), they either use authentication or POP
              before SMTP. You need to know what it's doing to be able to simulate it.


              --


              Comment

              Working...