5.7.0 Must issue a STARTTLS command first.

Rate It (1)

Last post 08-29-2008 6:05 PM by darkwarriorjam. 32 replies.

Sort Posts:

  • 5.7.0 Must issue a STARTTLS command first.

    04-21-2008, 9:41 AM
    • Loading...
    • mrcarte2
    • Joined on 04-21-2008, 12:57 PM
    • Posts 27

    hello everyone, i know this post gets around alot but i cant seem to find the answer to my perticular situation, my web.config file looks like this:

    <?xml version="1.0" encoding="utf-8"?>

    <configuration>

    <system.web>

    <compilation debug="true"/>

    <roleManager enabled="true" />

    <authentication mode="Forms" />

    </system.web>

    <system.net>

    <mailSettings>

    <smtp from= "my@gmail.com" deliveryMethod="Network">

    <network password="pw" userName="~~@gmail.com" host="smtp.gmail.com" port="587"/>

    </smtp>

    </mailSettings>

    </system.net>

    </configuration>

    in the website menu-->asp.net configuration-->application configuration-->configure smtp email i have it exactly the same info and i have it set on basic

    my recovery page looks like this :

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="RecoverPassword.aspx.cs" Inherits="RevocerPassword" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >

    <head runat="server">

    <title>Untitled Page</title>

     

    </head>

    <body>

    <form id="form1" runat="server">

    <div>

    <h1>

    Reset Password</h1>

    </div>

    <asp:LoginView ID="LoginView1" runat="server">

    <LoggedInTemplate>

    <asp:PasswordRecovery ID="PasswordRecovery1" runat="server">

    </asp:PasswordRecovery>

    <br />

    <br />

    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Home.aspx">Home</asp:HyperLink>

    </LoggedInTemplate>

    </asp:LoginView>

    </form>

    </body>

    </html>

    i have windows vista ultimate and vs 2005 i read on a different post i needed to add a :

    SmtpClient.EnableSsl = true;

    however where would i add this im not trying to send an email just yet im trying to do the auto pw recovery..

  • Re: 5.7.0 Must issue a STARTTLS command first.

    04-21-2008, 12:05 PM
    • Loading...
    • satalaj
    • Joined on 11-28-2007, 5:41 AM
    • Pune
    • Posts 915

    Auto Password recovery has no consern with gmail,hotmail,yahoo pop, IMAP, or SMTP.
    It depends on Membership profile provider model of your own web application.
     if you want to send or recive an email try something like this explaind in
    www.systemwebmail.com

     

  • Re: 5.7.0 Must issue a STARTTLS command first.

    04-21-2008, 12:25 PM
    • Loading...
    • mrcarte2
    • Joined on 04-21-2008, 12:57 PM
    • Posts 27

    satalaj:

    Auto Password recovery has no consern with gmail,hotmail,yahoo pop, IMAP, or SMTP.
    It depends on Membership profile provider model of your own web application.
     if you want to send or recive an email try something like this explaind in
    www.systemwebmail.com

    thank you for the link but ive been there before and couldnt find what im looking for i didnt see anything on a membership profile provider module or how to issue the starttls for auto recovery.. what exact link were you talking about on that site?

    also wouldnt it have some concern? auto recovery it trying to send an smtp message thru your email provider in my case gmail which i guess is requireing me to authenticate before it allows auto recovery to connect and send .. which the problem would lie somewhere in my web.config or recoverpassword.aspx which the codes are posted above

  • Re: 5.7.0 Must issue a STARTTLS command first.

    04-21-2008, 11:23 PM
    • Loading...
    • mrcarte2
    • Joined on 04-21-2008, 12:57 PM
    • Posts 27

    question .. and this may very well be the answer .. localhost on port 25 works .. but smtp.gmail.com on 587 does not .. because im in the process of making the web page on my computer (vista ultimate) in visual studio 2005 and it is not online yet is this why?

     

     if not then the question still is how to get the password recovery toolbox to authenticate / "Must issue a STARTTLS" or secure connection

  • Re: 5.7.0 Must issue a STARTTLS command first.

    04-22-2008, 12:42 AM
    • Loading...
    • satalaj
    • Joined on 11-28-2007, 5:41 AM
    • Pune
    • Posts 915

    http://forums.asp.net/t/1243641.aspx

    STARTTLS is related to secure connection.

    uses System.Net.Security.SslStream sslstream = new . . ...instead of
        
      System.Net.Security.NetworkStream ntstream = new . ... ...;

    Are you trying to Read or Send emails using GMail ?

    Satalaj

  • Re: 5.7.0 Must issue a STARTTLS command first.

    04-22-2008, 1:03 AM
    • Loading...
    • mrcarte2
    • Joined on 04-21-2008, 12:57 PM
    • Posts 27

    all i want at the moment is for the password recovery toolbox to connect to smtp.gmail.com on port 587 like it says or what ever port and email the user a new password .. and i take back my last post ... ive done so many changes to my web.config file,the website->asp.net configurations, and the control panel->administration tools->iis manager-> smtp email.. settings idk whats up left right or down with it anymore .. a nice clean code and settings required would be apperrciated..

  • Re: 5.7.0 Must issue a STARTTLS command first.

    04-22-2008, 6:11 AM
    • Loading...
    • satalaj
    • Joined on 11-28-2007, 5:41 AM
    • Pune
    • Posts 915

    Do you mean you want to use the password recovery controls provided by ASP.net 2.0 to retrive the Gmail passwords?

    Satalaj

  • Re: 5.7.0 Must issue a STARTTLS command first.

    04-22-2008, 12:42 PM
    • Loading...
    • mrcarte2
    • Joined on 04-21-2008, 12:57 PM
    • Posts 27

    no like im creating a website for users to log in and out of .. with the asp.net 2.0 features provided in visual studio 2005, and to do this im making a password recovery page for my site for the users .. and when they submit the user name and security answer i want the site to connect to smtp.gmail.com and email them a new password for my site ... or sumthing like that

     ok localhost works like this but i want to configure it to use smtp.gmail.com not local host..

    "

    <?xml version="1.0" encoding="utf-8"?>

    <configuration>

    <system.web>

    <compilation debug="true"/>

    <roleManager enabled="true" />

    <authentication mode="Forms" />

    </system.web>

    <system.net>

    <mailSettings>

    <smtp from="my@gmail.com" deliveryMethod="Network">

    <network defaultCredentials="true" password="pw" port="587" userName="my@gmail.com"/>

    </smtp>

    </mailSettings>

    </system.net>

    </configuration>

    "

     my controlpannel->administration tools->iis manager->smtp email settings are:

    email address = my@gmail.com

    deliver email to smtp server = localhost

                                  port = 587

    authentication settings = user name = my@gmail.com

                                       password =  mypw

    and the visual studio 2005(run as administrator) ->website->asp.net configuration->application configuration->configure smtp email settings are as follows:

    server name localhost

    server port 587

    from my@gmail.com

    authentication NTLM

     

  • Re: 5.7.0 Must issue a STARTTLS command first.

    04-23-2008, 8:00 AM
    • Loading...
    • satalaj
    • Joined on 11-28-2007, 5:41 AM
    • Pune
    • Posts 915

    I produced the same problem at my end
     It seems default .net mailsettings uses only

    System.Net.Sockets.NetworkStream

    and not

    System.Net.Security.SslStream

    Satalaj

  • Re: 5.7.0 Must issue a STARTTLS command first.

    04-23-2008, 9:08 AM
    • Loading...
    • mrcarte2
    • Joined on 04-21-2008, 12:57 PM
    • Posts 27

    satalaj:

    I produced the same problem at my end
     It seems default .net mailsettings uses only

    System.Net.Sockets.NetworkStream

    and not

    System.Net.Security.SslStream

    Satalaj

     

    ok so how would we fix this ?

    so it used the correct settings

  • Re: 5.7.0 Must issue a STARTTLS command first.

    04-23-2008, 9:24 AM
    • Loading...
    • satalaj
    • Joined on 11-28-2007, 5:41 AM
    • Pune
    • Posts 915

    Do you have any other email account or your company email account or the email account with domain where you are going to host this application.

    or try this post http://joelbennett.wordpress.com/2007/09/

    or write down your own code for sending email via gmail

    Satalaj.

     

  • Re: 5.7.0 Must issue a STARTTLS command first.

    04-23-2008, 10:08 AM
    • Loading...
    • mrcarte2
    • Joined on 04-21-2008, 12:57 PM
    • Posts 27