Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET Objects

 AfterLogic Forum : MailBee.NET Objects
Subject Topic: Connection forcibly closed... Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
reny
Newbie
Newbie
Avatar

Joined: 06 January 2009
Location: India
Online Status: Offline
Posts: 4
Posted: 18 March 2009 at 11:12am | IP Logged Quote reny

hi,
I am trying to download messages from my mail server continuously using a windows service. Once my service starts i try to send messages to my mail server. After the msg is downloaded into my db i get an exception saying connection forcibly closed. I don't know wats the reason. If i run the appliction seperately not within a service i don't get any problem. Is this problem related to threading procedure that i am using.. Please reply.
Back to Top View reny's Profile Search for other posts by reny
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 18 March 2009 at 3:55pm | IP Logged Quote Alex

This exception is caused by the operating system, not by MailBee or .NET framework. Perhaps, when the application is being run on behalf of System user, other network software running on this computer (firewall or whatever) closes the connection. When the application is being run under regular account, this does not happen. Of course, this is just a guess.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
reny
Newbie
Newbie
Avatar

Joined: 06 January 2009
Location: India
Online Status: Offline
Posts: 4
Posted: 19 March 2009 at 11:04am | IP Logged Quote reny

Actually this exception occurs when the service is running. I don't have to send any messages. After some 10 to 15 mins an exception is thrown saying connection is closed forcibly. What is the reason behind this.The firewall is disabled in my pc. still this error occurs.
Back to Top View reny's Profile Search for other posts by reny
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 20 March 2009 at 5:57am | IP Logged Quote Andrew

Does your service keep connection with mail server open for 10 to 15 mins? If so, it's terminated by timeout. To keep connection alive for a long time, you should periodically call Noop method (available in Smtp, Pop3, Imap classes) to notify server that your application is still alive.

Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
reny
Newbie
Newbie
Avatar

Joined: 06 January 2009
Location: India
Online Status: Offline
Posts: 4
Posted: 20 March 2009 at 11:45pm | IP Logged Quote reny

I have been disconnecting from the mail server once all the mails for that particular user has been downloaded. So I don't think its connected continuously for about 10 minutes to a mail server unless if its taking so much time to download all the messages from each user.
Back to Top View reny's Profile Search for other posts by reny
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 23 March 2009 at 6:51am | IP Logged Quote Andrew

Please enable logging, reproduce the issue and provide us with the log file for examination.

Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
jbronzoulis
Newbie
Newbie


Joined: 23 March 2009
Location: United States
Online Status: Offline
Posts: 2
Posted: 25 March 2009 at 10:06am | IP Logged Quote jbronzoulis

I am having the same problem. I have included some of the log file. Thanks.

[15:21:54.18] [INFO] Assembly version: 5.0.1.124.
[15:21:54.18] [INFO] Will resolve host "pop.bizmail.yahoo.com".
[15:21:54.28] [INFO] Host "pop.bizmail.yahoo.com" resolved to IP address(es) 209.191.119.134, xxx.xxx.xxx.xxx.
[15:21:54.28] [INFO] Will connect to host "pop.bizmail.yahoo.com" on port 995.
[15:21:54.31] [INFO] Socket connected to IP address 209.191.119.134 on port 995.
[15:22:14.37] [INFO] Error: An existing connection was forcibly closed by the remote host. InnerException message follows: An existing connection was forcibly closed by the remote host
[15:22:14.37] [INFO] Will disconnect from host "pop.bizmail.yahoo.com".
[15:22:14.37] [INFO] Disconnected from host "pop.bizmail.yahoo.com".
[15:22:14.39] [INFO] Assembly version: 5.0.1.124.
[15:22:14.39] [INFO] Will resolve host "pop.bizmail.yahoo.com".
[15:22:14.46] [INFO] Host "pop.bizmail.yahoo.com" resolved to IP address(es) xxx.xxx.xxx.xxx, 209.191.119.134.
[15:22:14.46] [INFO] Will connect to host "pop.bizmail.yahoo.com" on port 995.
[15:22:14.50] [INFO] Socket connected to IP address xxx.xxx.xxx.xxx on port 995.
[15:22:34.54] [INFO] Error: An existing connection was forcibly closed by the remote host. InnerException message follows: An existing connection was forcibly closed by the remote host
[15:22:34.54] [INFO] Will disconnect from host "pop.bizmail.yahoo.com".
[15:22:34.54] [INFO] Disconnected from host "pop.bizmail.yahoo.com".
Back to Top View jbronzoulis's Profile Search for other posts by jbronzoulis
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 26 March 2009 at 12:45am | IP Logged Quote Andrew

Just enable SSL, but use SslStartupMode.OnConnect instead of SslStartupMode.UseStartTls for connecting to dedicated SSL port 995.

Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 
jbronzoulis
Newbie
Newbie


Joined: 23 March 2009
Location: United States
Online Status: Offline
Posts: 2
Posted: 06 July 2009 at 1:16pm | IP Logged Quote jbronzoulis

Andrew wrote:
Just enable SSL, but use SslStartupMode.OnConnect instead of SslStartupMode.UseStartTls for connecting to dedicated SSL port 995.

Best regards,
Andrew


This worked for a while. Now I started getting the error again.
An existing connection was forcibly closed by the remote host.
Back to Top View jbronzoulis's Profile Search for other posts by jbronzoulis
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 07 July 2009 at 1:16am | IP Logged Quote Andrew

Please try connecting to the same host through SSL via another e-mail client like Mozilla Thunderbird. If it works fine, but doesn't in case of your application, please capture a new log and provide us for examination.

Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide