Solved

the transport failed to connect to the server

Posted on 2010-08-23
6
1,258 Views
Last Modified: 2012-05-10
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.InteropServices.COMException: 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\helpdesk\Admin\CreateNewTicket2.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.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) +0
   System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) +337
   System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture) +36
   System.Web.Mail.LateBoundAccessHelper.CallMethod(Type type, Object obj, String methodName, Object[] args) +66
   System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) +49

[HttpException (0x80004005): The transport failed to connect to the server.
]
   System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) +99
   System.Web.Mail.CdoSysHelper.Send(MailMessage message) +1738
   System.Web.Mail.SmtpMail.Send(MailMessage message) +351
   ASP.helpdesk_admin_createnewticket2_aspx.Submit_Click(Object Src, EventArgs E) in c:\inetpub\wwwroot\helpdesk\Admin\CreateNewTicket2.aspx:240
   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

 
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
0
Comment
Question by:kouts1
  • 3
  • 3
6 Comments
 
LVL 21

Expert Comment

by:chapmanjw
ID: 33503111
It sounds like your application is unable to communicate with the SMTP server.  You could try another SMTP server or try sending to that SMTP server from another application.  I would start your troubleshooting there.  

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
0
 

Author Comment

by:kouts1
ID: 33503219
I tried telnet but it cannot connect to host.  What can I do next?  My server is Windows 2003 SP2.

Thanks!
0
 
LVL 21

Expert Comment

by:chapmanjw
ID: 33503307
Is the SMTP server up and running?  Can you connect to it from another computer other than the web server?
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

Author Comment

by:kouts1
ID: 33503377
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!
0
 
LVL 21

Accepted Solution

by:
chapmanjw earned 500 total points
ID: 33503410
Can you ping or tracert from the web server to SMTP server?  There could be a firewall or other network related issue causing the server not to be able to connect.
0
 

Author Closing Comment

by:kouts1
ID: 33561826
THANK YOU!

It was an exchange issue.  My exchnage admin took care of it with hints from your suggestions.
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question