Server does not support secure connections.

 Hi,

I am getting the following error message:

Server does not support secure connections.

When trying to send e-mails from my code-behind.

Here is the guilty code:

    protected void CreateUserWizard2_ContinueButtonClick(object sender, EventArgs e)
    {



        StringBuilder bodyMsg = new StringBuilder();
        TextBox Username = (TextBox)CreateUserWizard2.CreateUserStep.ContentTemplateContainer.FindControl("UserName");
        TextBox EMail = (TextBox)CreateUserWizard2.CreateUserStep.ContentTemplateContainer.FindControl("Email");



        bodyMsg.Append("\n\n Thank you for creating your new account.Your new account has been created with the following username:");
        bodyMsg.AppendFormat("\nUserName: {0}", Username.Text);



        NetworkCredential loginInfo = new NetworkCredential("postmaster@MYSITE.com", "PASSWORD");
        MailMessage msg = new MailMessage();
        msg.From = new MailAddress("postmaster@MYSITE.com");
        msg.To.Add(new MailAddress(EMail.Text));
        msg.Subject = "SUBJECT";
        msg.Body = bodyMsg.ToString();
        msg.IsBodyHtml = false;

        SmtpClient client = new SmtpClient("mail.MYSITE.com", PORT NUM);
        client.EnableSsl = true;
        client.UseDefaultCredentials = false;
        client.Credentials = loginInfo;
        client.DeliveryMethod = SmtpDeliveryMethod.Network;
        client.Send(msg);

        Response.Redirect("../thankyou.aspx");



    }

Now, unless someone more knowledgeable says other-wise, I have a suspicion the error is caused because my server required authentication (or atleast it does for outlook express). Could this be the reason? If so, how to I solve the issue?

If not, what could be causing the error?

Thanks!

Jon 

0
jbear123
1/14/2008 11:46:17 AM
asp.net.getting-started 91979 articles. 2 followers. Follow

0 Replies
404 Views

Similar Articles

[PageSpeed] 14

Reply:

Similar Artilces:

System.Net.Mail.SmtpException: Server does not support secure connections
hi.. my problem is that "mail sending function" doesn't work on http://www.vwdhosting.net .. i don't know why!! though it works fine "locally"   I  use it to recover password . It works fine "locally" with the following web.config settings: <system.net> <mailSettings><smtp from="myname@gmail.com" deliveryMethod="Network"> <network host="smtp.gmail.com" port="587" userName="myname@gmail.com" password="mypassword"></network></sm...

Started getting a "Unable to establish secure connection with the server" error
I've been working on revising this ASP.NET 2.0 app for the last couple of days.  We've got Windows XP Professional PCs with SP2 installed, and we do our development on those machines.  Yesterday I was working on some of the .aspx pages, saved the changes and ran them, and everything was just fine.  It worked perfectly.  I authenticated against our Active Directory just fine.  However, today when I tried to test it some more I got the following error message, "Unable to establish secure connection with the server" and it highlights the type attribute...

Server not support secure connections?!
 Hi,I am getting the following error message:Server does not support secure connections.When trying to send e-mails from my code-behind. Here is the guilty code:    protected void CreateUserWizard2_ContinueButtonClick(object sender, EventArgs e)    {        StringBuilder bodyMsg = new StringBuilder();        TextBox Username = (TextBox)CreateUserWizard2.CreateUserStep.ContentTemplateContainer.FindControl("UserName");        TextBox EMail = (Tex...

get error The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required.
 Hi,I was able to send mail with no trouble before few days.Then due to some reason, i Formatted pc &  re-installed visual studio & IIS Now when i try to send mail, i get this error.The SMTP server requires a secure connection or the client was not authenticated.In my web.config file i write<mailSettings>      <smtp from="myemail@gmail.com">        <network host="smtp.gmail.com" port="587" userName="myemail" password="xxxx" defaultCredentials="fa...

RE: Server does not support secure connections.
Not sure what the problem here is...help please Here is the error: Server does not support secure connections. 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.Net.Mail.SmtpException: Server does not support secure connections.Source Error: Line 41: Line 42: '(4) Send the MailMessage (will use the Web.config settings) Line 43: smtp.Send(mm) Line 44: Line 45: Source File: C:\Documents...

help. when using Profile GetPropertyValue, I get the following connection error: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure
 Hi,I need some help. I am getting this error after I complete the asp.net register control and click on the continue button. It crashed when it tries to get it calls this Profile property((string)(this.GetPropertyValue("Address1")));When I look at the stack, it is coming from my ProfileWrapper class which adds user address, city, etc.. from a class which inherits fromSystem.Web.Profile.ProfileBase. From the stack, it is calling the System.Web.Profile and crashed when it tries to open a connection atSystem.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObj...

Security Error connecting to SQL Server using ADO.net
In our environment, we can successfully connect to SQL server using ADO.net interface, but when we delivered the software to clients, they are having connection errors. Connection parameters all look good. I am not sure what this error is about and unfortunately, the error does not tell much. Thanks in advance for helping me out Below are the details of the error Initial Connection Error Trans Error Code: -1 DBErrorCode:999 DBMS: ADO.Net DB Error Message: System.Security.SecurityException:Request failed. at Sybase.PowerBuilder.Db.Block.OleDbBlock.Connect(String cnnStr,...

'Server does not support secure connections' error with SMTP mail and SSL
Hi I am recieving the following error when trying to send smtp mail from a website with a SSL certificate applied to it.'Server does not support secure connections' I am trying to send smtp mail from a page.  The email was being sent ok.  The whole site was required to be made more secure so a SSL certificate was applied to it but now the smtp error occurs.  I have used the 'enablessl' property to both true and false but i still receive the same message. How do I make my site support secure connections?  How do I make my error go away? thanks I gather that you're us...

Free .Net and Sql Server Training Videos for Developers just getting started
I figured since this is the Getting started forum I would mention a great .Net training video site with some free videos.http://www.TechnicalVideos.netThanksMike James...

Net zero is no longer accepting me trying to get to NetZero. The proxy server is refusing connections
Name: Scott Orlins Email: gwu76_at_netzero.net Product: Firefox Summary: Net zero is no longer accepting me trying to get to NetZero. The proxy server is refusing connections Comments: Net Zero is no longer accepting me with firefox when I try to go to Net Zero. This is also happening quite frequently when I use the latest version of Firefox, not connecting to net zero but to other websites. Scott Orlins gwu76@netzero.net The proxy server is refusing connections Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041217 ...

Connecting to an external database server...VS.NET doesn't support domain switching???
I've installed SSRS on an application server with IIS and I'm now trying to connect to the sql server database on the database server to create my data sets, but VS.NET is stating that if the server is not within the domain, it cannot connect.  Is there somehow to get around this? Thanks....

Can't Connect .Net application from Windows Server 2003 to Database Server (SQL Server 2000)
Hi, I am having a problem connecting my .net applications from the application server to the database server. When I run the application from my windows xp (sp2) box it works fine. When I try to connect via SQL Management Studio to the database server from the application server I get the same error. Here is the error: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider...

get error Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.
Hi,my interaction with database is completely lost. I cannot even open database and view tablesI get error Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.I am using VS 2005  Error log: SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.2008-09-07 13:10:03.51 Server      Detected 1 CPUs. This is an informational message; no user action is required.2008-09-07 13:10:28.40 Server   &...

Get connection string from web.config and secure that connection
Hi, I store my connection string on my web.config file, and I want to create a new connection on c# like:SqlConnection con = new SqlConnection();con.ConnectionString= //connection string on web.config fileAfter that, The connection string on the web.config file is in clear text and I want to make it secure but easy to work because this job is to deliver until friday. Is there any easy way to do this and keep the possibility of creating a new connection and making reference to this connection string without need for decrypt data?Thanks, please help!Best regards,David Ribeiro After reading t...

Web resources about - Server does not support secure connections. - asp.net.getting-started

Connection - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

iMedia Connection: Interactive Marketing News, Features, Podcasts and Video - iMediaConnection.com
High-quality data, if not used properly, can still lead marketers to make bad decisions. Consider these common ways that numbers are used to ...

HTTP persistent connection - Wikipedia, the free encyclopedia
... tacked on to an existing protocol. If the browser supports keep-alive, it adds an additional header to the request: Following this, the connection ...

CareerSonar Turns Facebook Friends Into Job Connections
Looking for a job ? Among your Facebook friends lies the potential for employment. CareerSonar , a new service, brings together a person’s connections ...

Kings Cross identities arrested in connection with murder
Two Kings Cross identities&nbsp;have been arrested in connection with the murder of a man at Sydney hotel.

Governor declares state of emergency in connection with California methane leak
... of Emergency Services) On Wednesday evening, California Governor Jerry Brown declared a state of emergency in Los Angeles County in connection ...

Tons Of Methane Are Spewing Out Of California, And There’s A Connection To The Governor
The out of control leak has forced thousands of residents to flee their homes. Gov. Brown's sister is a paid board member at the company that ...

Report: Man arrested in connection with Ashley Olsen's murder
Italian media agency reports that a non-EU male has been arrested in the murder of the 35-year-old American

Toyota and Kymeta rely on satellites to power this Mirai's data connection
They're hoping to achieve gigabit wireless speeds within the next few years.

Star Wars Rebels Trailer Reveals Force Awakens Connection - Collider
The new extended trailer for the mid-season premiere of the Disney XD animated series Star Wars Rebels reveals a huge connection to The Force ...

Resources last updated: 1/16/2016 11:50:17 AM