Server Error when Submitting Contact Form

Topics: Developer Forum, Project Management Forum, User Forum
Oct 16, 2009 at 11:22 PM

Dr. Dumass here,

Well, assuming that my previous post gets answered and I have not stepped off the ledge, my website (yes, the one that I locked myself out of), throws the error below when attempting to submit a contact form:

Any guidance would be greatly appreciated! With all I'm learning from you all, my IQ may yet get above room temperature!

Thank you

Server Error in '/' Application.


No connection could be made because the target machine actively refused it 205.178.146.50:25

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 205.178.146.50:25

Source Error:

 

Line 101:                                   }

Line 102:

Line 103:                                   client.Send(mail);

Line 104:

Line 105:                                   Session["ContactFormSent"] = true;


Source File: e:\inetpub\clients\cloudlifesciences.com\wwwroot\SectionControls\ContactForm.ascx.cs    Line: 103

Stack Trace:

 

[SocketException (0x274d): No connection could be made because the target machine actively refused it 205.178.146.50:25]

   System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +239

   System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) +35

   System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +224

 

[WebException: Unable to connect to the remote server]

   System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6, Int32 timeout) +5421675

   System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback) +202

   System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback) +21

   System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout) +332

   System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) +160

   System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) +159

   System.Net.Mail.SmtpClient.GetConnection() +35

   System.Net.Mail.SmtpClient.Send(MailMessage message) +1213

 

[SmtpException: Failure sending mail.]

   System.Net.Mail.SmtpClient.Send(MailMessage message) +1531

   SectionControls_ContactForm.btnSubmit_Click(Object sender, EventArgs e) in e:\inetpub\clients\cloudlifesciences.com\wwwroot\SectionControls\ContactForm.ascx.cs:103

   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111

   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110

   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10

   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13

   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36

   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

 


Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4016

Oct 17, 2009 at 12:38 AM
Check the cms settings for smtp.

Also the contact form settings.

>
Oct 18, 2009 at 8:53 PM
Edited Oct 18, 2009 at 8:55 PM

I checked the cms settings and the one thing I was unclear on was the "smtp domain". I used the form http://www.url.com. Is that correct?

I apologize again for my ignorance and I really appreciate your guidance, patience and rapid response.

The latest error is as follows:

 

Server Error in '/' Application.

An existing connection was forcibly closed by the remote host

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

Source Error:

Line 101:				}
Line 102:
Line 103:				client.Send(mail);
Line 104:
Line 105:				Session["ContactFormSent"] = true;


Source File: e:\inetpub\clients\cloudlifesciences.com\wwwroot\SectionControls\ContactForm.ascx.cs    Line: 103

Stack Trace:

[SocketException (0x2746): An existing connection was forcibly closed by the remote host]
   System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) +73
   System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +131

[IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.]
   System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +294
   System.Net.DelegatedStream.Read(Byte[] buffer, Int32 offset, Int32 count) +42
   System.Net.BufferedReadStream.Read(Byte[] buffer, Int32 offset, Int32 count) +105
   System.Net.Mail.SmtpReplyReaderFactory.ReadLines(SmtpReplyReader caller, Boolean oneLine) +224
   System.Net.Mail.SmtpReplyReaderFactory.ReadLine(SmtpReplyReader caller) +16
   System.Net.Mail.CheckCommand.Send(SmtpConnection conn, String& response) +54
   System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command, String from) +31
   System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception) +101
   System.Net.Mail.SmtpClient.Send(MailMessage message) +1278

[SmtpException: Failure sending mail.]
   System.Net.Mail.SmtpClient.Send(MailMessage message) +1531
   SectionControls_ContactForm.btnSubmit_Click(Object sender, EventArgs e) in e:\inetpub\clients\cloudlifesciences.com\wwwroot\SectionControls\ContactForm.ascx.cs:103
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565



Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4016

<!-- [SocketException]: An existing connection was forcibly closed by the remote host at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) [IOException]: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) at System.Net.DelegatedStream.Read(Byte[] buffer, Int32 offset, Int32 count) at System.Net.BufferedReadStream.Read(Byte[] buffer, Int32 offset, Int32 count) at System.Net.Mail.SmtpReplyReaderFactory.ReadLines(SmtpReplyReader caller, Boolean oneLine) at System.Net.Mail.SmtpReplyReaderFactory.ReadLine(SmtpReplyReader caller) at System.Net.Mail.CheckCommand.Send(SmtpConnection conn, String& response) at System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command, String from) at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception) at System.Net.Mail.SmtpClient.Send(MailMessage message) [SmtpException]: Failure sending mail. at System.Net.Mail.SmtpClient.Send(MailMessage message) at SectionControls_ContactForm.btnSubmit_Click(Object sender, EventArgs e) in e:\inetpub\clients\cloudlifesciences.com\wwwroot\SectionControls\ContactForm.ascx.cs:line 103 at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) [HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown. at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.default_aspx.ProcessRequest(HttpContext context) in e:\temp\Temporary ASP.NET Files\root\7b9d7d95\22ee2e46\App_Web_xhna_yjx.4.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) --><!-- This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using <customErrors mode="Off"/>. Consider using <customErrors mode="On"/> or <customErrors mode="RemoteOnly"/> in production environments.-->
Oct 18, 2009 at 11:55 PM
I do not use that setting on my Mwpsk site because I apprently do not
need it because my site works without it.

But your guess looks correct to me.

>
Oct 19, 2009 at 2:12 AM

Apparently, I did not need it either! After deleting that line it worked perfectly!

I cannot thank you enough for your help once again!