469,616 Members | 1,699 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,616 developers. It's quick & easy.

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
Oct 18 '06 #1
6 5526
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" <Ju****@discussions.microsoft.comwrote in message
news:CC**********************************@microsof t.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
Oct 18 '06 #2
Julien

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

--
http://www.hadihariri.com
http://www.malagadnug.org
Oct 18 '06 #3
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.

--
http://www.hadihariri.com
http://www.malagadnug.org
Oct 20 '06 #4
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?

--
http://www.hadihariri.com
http://www.malagadnug.org
Oct 20 '06 #5
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?

--
http://www.hadihariri.com
http://www.malagadnug.org
Oct 20 '06 #6
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.
--
http://www.hadihariri.com
http://www.malagadnug.org
Oct 20 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Hawk Wu via DotNetMonster.com | last post: by
3 posts views Thread by Peter Stojkovic | last post: by
1 post views Thread by Frank | last post: by
1 post views Thread by Frank | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.