The transport failed to connect to the server.

Last post 09-04-2009 9:01 AM by naveenkumarmandava. 10 replies.

Sort Posts:

  • The transport failed to connect to the server.

    05-25-2006, 12:40 PM
    • Member
      5 point Member
    • dauve
    • Member since 05-25-2006, 4:28 PM
    • Posts 1

    Does anyone know where in the code this error is occurring at?

    It runs fine locally when I am testing but once it is on the server it bombs and I get the error below. My system is:

    • windows 2003
    • exchange 2003 (5.5)
    • .Net 1.1

    Get the following error.


    Server Error in '/netbranch' Application.
      _____  

    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:


    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

    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 invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) +473
       System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) +58

    [HttpException (0x80004005): Could not access 'CDO.Message' object.]
       System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) +113
       System.Web.Mail.CdoSysHelper.Send(MailMessage message) +1848
       System.Web.Mail.CdoSysHelper.Send(String from, String to, String subject, String messageText) +74
       System.Web.Mail.SmtpMail.Send(String from, String to, String subject, String messageText) +168
       ASPNET.StarterKit.Portal.Register.RegisterBtn_Click(Object sender, EventArgs E)
       System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +108
       System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +138
       System.Web.UI.Page.ProcessRequestMain() +1292

      _____  

    Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET Version:1.1.4322.2300

  • Re: The transport failed to connect to the server.

    05-31-2006, 2:00 PM
    • Member
      5 point Member
    • IrfanZaidi
    • Member since 05-31-2006, 5:47 PM
    • Posts 1

    Hi Dauve,

    The possible cause of this error is Smtp.Mail unable to locate your exchange server. Try checking the firewall for port 25 on which the Exchange server is configured.

    Also, first try setting

    SmtpMail.SmtpServer="localhost";

    on the development (win2k3) machine. It should work. Check the "Queue" folder also to be sure that your application is working good.

    Further, try specifying IP Address instead of name in SmtpServer property.

    Lemme know if this works.

    Take Care.

    Irfan Zaidi.
    (running the show @ http://onlinebiznis.blogspot.com)

  • Re: The transport failed to connect to the server.

    02-18-2008, 1:02 AM
    • Member
      85 point Member
    • Jay Khanpara
    • Member since 05-15-2007, 10:36 AM
    • Banaglore
    • Posts 41

     Hi Irfan,

    I am also getting the same error.

    I tried with your solution by setting SmtpMail.SmtpServer = "localhost" but still it displays the same error.

    My question is how to set the Port address in ASP.NET 1.1, I know about 2.0 & 3.5 but dont know about 1.1

    Please give me some suggestions how to over come this issue....

    Thanks

     



    Regards,
    Jay Khanpara
  • Re: The transport failed to connect to the server.

    07-16-2008, 10:01 AM

    I am using below code I am getting Transport falied to connect to server ...Plz any one help me out this issue.... 

    sch = "http://schemas.microsoft.com/cdo/configuration/"

    cdoConfig = CreateObject("CDO.Configuration")

    With cdoConfig.Fields

    .Item(sch & "sendusing") = 2 ' cdoSendUsingPort

    .Item(sch & "smtpserver") = "<mailexchanger.xxx.xx.us>"

    .update()

    End With

    MyMail = CreateObject("CDO.Message")

    'cdoMessage = CreateObject("CDO.Message")

    With MyMail

    .Configuration = cdoConfig

    .From = "xxx.xxx@state.sd.us"

    .To = "xxx.xxx@state.sd.us"

    .Subject = "Sample CDO Message"

    .TextBody = "This is a test for CDO.message"

    .Send()

    End With

    MyMail = Nothing

    cdoConfig = Nothing

    Nk.Mandava
  • Re: The transport failed to connect to the server.

    07-16-2008, 10:26 AM
    helo all

    When I am using this code with my domain mail ids email is not going but when i use emails like gamil or others its working pretty good..what may be reason please help me out....

    Dim strResults As String
    'Put user code to initialize the page here
    Dim msg As New MailMessage
    ' TO: can be a semicolon separated list of email addresses
    'msg.To = strRecip & ";"
    msg.To = strTo
    'msg.Bcc = ";"
    msg.Bcc = ";"
    msg.From = strFrom
    msg.Subject = strSubject
    msg.BodyFormat = MailFormat.Html '.text or .html
    msg.Body = strBody
    msg.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
    msg.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mailexchanger.xxx.xx.xx"
    msg.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    SmtpMail.SmtpServer.Insert(0, " mailexchanger.xxx.xx.xx")

    Try
    SmtpMail.Send(msg)
    strResults = "Message sent to " & strTo & " at: " & Date.Now & "."
    Return strResults
    Catch ex As Exception
    strResults = "Can't send message cuz: " & ex.Message
    Return strResults
    End Try

    msg = Nothing
    Nk.Mandava
  • Re: The transport failed to connect to the server.

    01-15-2009, 2:10 PM

    Finally I figured it out it is problem with our server settings .

    The gateways are closed for the website in mail settings.

    Nk.Mandava
  • Re: The transport failed to connect to the server.

    01-30-2009, 12:42 PM
    • Member
      2 point Member
    • cabellooa
    • Member since 01-30-2009, 5:40 PM
    • Posts 1

    How did you resolve the problem? I do not know how to check is the gateways are close or not in mail settings.

    Thanks

     

     

  • Re: The transport failed to connect to the server.

    01-30-2009, 2:16 PM

    You need to verify with your Admin to make sure that the mail settings (gateways) are opened for ur website in the  server .

    Thanks

     

    Nk.Mandava
  • Re: The transport failed to connect to the server.

    04-11-2009, 2:25 AM
    • Member
      96 point Member
    • srankamal
    • Member since 02-04-2009, 11:49 AM
    • Posts 219

    hello all i am also facing same problem

    how can i set the smtp system settings in my asp.net page by coding ..

    so user avoid the smtp send using configration error .please help me out

    i will be very thankfull
    Mark as an answer if it helps
  • Re: The transport failed to connect to the server.

    09-04-2009, 8:00 AM

     Hi...

    I have the same problem with sending mail..

    The error is like given below:

    -----------------------------------------------------------------------------------------

    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 47:             SmtpMail.SmtpServer = "mail.technologiesolution.com";
    Line 48:             //SmtpMail.SmtpServer = "localhost";
    Line 49:             SmtpMail.Send(Mailmsg);
    Line 50: 
    Line 51:             Response.Redirect("MailSent.aspx");


    -----------------------------------------------------------------------------------------

     

    so,Can you help me in that code...

    And tell me What i have to write in.. SmtpMail.SmtpServer= ? ......

    if I want to send mail to any mail server

  • Re: The transport failed to connect to the server.

    09-04-2009, 9:01 AM

    HI drashti,


    Please make sure your server IP address is added to the gateway or firewall. We had the same prblm and we contacted the admin he added our servers Ip address to the gateway. Then the mail sending option is good to go ....I thnk this is not the coding issue this is a permission issue.



    Naveen Mandava.

    Nk.Mandava
Page 1 of 1 (11 items)