Solved

the transport failed to connect to the server

Posted on 2010-08-23
6
1,283 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

 

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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
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…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

732 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