Gus Koutsivitis
asked on
the transport failed to connect to the server
I am getting "the transport failed to connect to server" im my asp.net application. I am not sure what is causing this after 2 years of running smoothly. Basically the web app is a helpdesk ticket system. it sends an email to the pc tech.
Exact error:
The transport failed to connect to the server.
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.Runtime.InteropServ ices.COMEx ception: The transport failed to connect to the server.
Source Error:
Line 238:SmtpMail.SmtpServer = "10.1.88.34"
Line 239:
Line 240:SmtpMail.Send(mailobj2 )
Line 241:
Line 242:
Source File: c:\inetpub\wwwroot\helpdes k\Admin\Cr eateNewTic ket2.aspx Line: 240
Stack Trace:
[COMException (0x80040213): The transport failed to connect to the server.
]
[TargetInvocationException : Exception has been thrown by the target of an invocation.]
System.RuntimeType.InvokeD ispMethod( String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) +0
System.RuntimeType.InvokeM ember(Stri ng name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) +337
System.Type.InvokeMember(S tring name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture) +36
System.Web.Mail.LateBoundA ccessHelpe r.CallMeth od(Type type, Object obj, String methodName, Object[] args) +66
System.Web.Mail.LateBoundA ccessHelpe r.CallMeth od(Object obj, String methodName, Object[] args) +49
[HttpException (0x80004005): The transport failed to connect to the server.
]
System.Web.Mail.LateBoundA ccessHelpe r.CallMeth od(Object obj, String methodName, Object[] args) +99
System.Web.Mail.CdoSysHelp er.Send(Ma ilMessage message) +1738
System.Web.Mail.SmtpMail.S end(MailMe ssage message) +351
ASP.helpdesk_admin_createn ewticket2_ aspx.Submi t_Click(Ob ject Src, EventArgs E) in c:\inetpub\wwwroot\helpdes k\Admin\Cr eateNewTic ket2.aspx: 240
System.Web.UI.WebControls. Button.OnC lick(Event Args e) +111
System.Web.UI.WebControls. Button.Rai sePostBack Event(Stri ng eventArgument) +110
System.Web.UI.WebControls. Button.Sys tem.Web.UI .IPostBack EventHandl er.RaisePo stBackEven t(String eventArgument) +10
System.Web.UI.Page.RaisePo stBackEven t(IPostBac kEventHand ler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePo stBackEven t(NameValu eCollectio n postData) +36
System.Web.UI.Page.Process RequestMai n(Boolean includeStagesBeforeAsyncPo int, Boolean includeStagesAfterAsyncPoi nt) +1565
This is my vb.net code for email:
Dim mailobj2 AS new MailMessage
mailobj2.From = "mmchelpdesk@maimonidesmed .org"
mailobj2.To = ddlTechAssign.SelectedItem .value
mailobj2.Subject = "New Help Desk Request - CaseID#:" + txtCaseID.text
mailobj2.BodyFormat = MailFormat.text
mailobj2.Body = ("Case ID#: " + txtCaseID.Text + " " + Chr(13) + "Date/Time Submitted: " + DateTime.Now.ToString("MM/ dd/yyyy hh:mm:ss") + "" + "" + Chr(13) + Chr(13) + "Problem Description: " + Chr(13) + txtProbDetails.text + Chr(13) + Chr(13) + "Ticket Status:" + " " + txtStatus.text + Chr(13) + Chr(13) + "User Contact Details:" + Chr(13) + txtUFName.text + Chr(13) + txtULName.text + Chr(13) + txtDep_Location.text + Chr(13) + txtUPhoneExt.text)
SmtpMail.SmtpServer = "10.1.88.34"
SmtpMail.Send(mailobj2)
Like I said this app was running fine for 2 years straight. Today I get this error. Any help would be appreciated.
Thanks,
Kouts1
Exact error:
The transport failed to connect to the server.
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.Runtime.InteropServ
Source Error:
Line 238:SmtpMail.SmtpServer = "10.1.88.34"
Line 239:
Line 240:SmtpMail.Send(mailobj2
Line 241:
Line 242:
Source File: c:\inetpub\wwwroot\helpdes
Stack Trace:
[COMException (0x80040213): The transport failed to connect to the server.
]
[TargetInvocationException
System.RuntimeType.InvokeD
System.RuntimeType.InvokeM
System.Type.InvokeMember(S
System.Web.Mail.LateBoundA
System.Web.Mail.LateBoundA
[HttpException (0x80004005): The transport failed to connect to the server.
]
System.Web.Mail.LateBoundA
System.Web.Mail.CdoSysHelp
System.Web.Mail.SmtpMail.S
ASP.helpdesk_admin_createn
System.Web.UI.WebControls.
System.Web.UI.WebControls.
System.Web.UI.WebControls.
System.Web.UI.Page.RaisePo
System.Web.UI.Page.RaisePo
System.Web.UI.Page.Process
This is my vb.net code for email:
Dim mailobj2 AS new MailMessage
mailobj2.From = "mmchelpdesk@maimonidesmed
mailobj2.To = ddlTechAssign.SelectedItem
mailobj2.Subject = "New Help Desk Request - CaseID#:" + txtCaseID.text
mailobj2.BodyFormat = MailFormat.text
mailobj2.Body = ("Case ID#: " + txtCaseID.Text + " " + Chr(13) + "Date/Time Submitted: " + DateTime.Now.ToString("MM/
SmtpMail.SmtpServer = "10.1.88.34"
SmtpMail.Send(mailobj2)
Like I said this app was running fine for 2 years straight. Today I get this error. Any help would be appreciated.
Thanks,
Kouts1
ASKER
I tried telnet but it cannot connect to host. What can I do next? My server is Windows 2003 SP2.
Thanks!
Thanks!
Is the SMTP server up and running? Can you connect to it from another computer other than the web server?
ASKER
yes the exchange server (smtp server) is up and running. I try it on a different windows 2003 machine and I telnet to it with no problems.
Thanks!
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
THANK YOU!
It was an exchange issue. My exchnage admin took care of it with hints from your suggestions.
It was an exchange issue. My exchnage admin took care of it with hints from your suggestions.
From the web server, you could also use Telnet to check if it is possible to connect to the SMTP on port 25. Here are instructions how: http://support.microsoft.com/kb/153119