Solved

the transport failed to connect to the server

Posted on 2010-08-23
6
1,174 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
Comment Utility
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
Comment Utility
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
Comment Utility
Is the SMTP server up and running?  Can you connect to it from another computer other than the web server?
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:kouts1
Comment Utility
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
Comment Utility
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
Comment Utility
THANK YOU!

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

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now