RE: Server does not support secure connections.

Not sure what the problem here 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 and Settings\Circle\My Documents\Visual Studio 2005\WebSites\1618 Graphics\contact.aspx.vb    Line: 43

Stack Trace:

[SmtpException: Server does not support secure connections.]
   System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) +1722
   System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) +265
   System.Net.Mail.SmtpClient.GetConnection() +43
   System.Net.Mail.SmtpClient.Send(MailMessage message) +1969
   _Default.btnSend_Click(Object sender, EventArgs e) in C:\Documents and Settings\Circle\My Documents\Visual Studio 2005\WebSites\1618 Graphics\contact.aspx.vb:43
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +75
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +97
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4921

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


Here is my code:


Protected Sub btnSend_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSend.Click

        Const ToAddress As String = "email address here"

        '(1) Create the MailMessage instance 

        Dim mm As New System.Net.Mail.MailMessage("email address here", ToAddress)

        '(2) Assign the MailMessage's properties 
        mm.Subject = "Contact Form" + "                    " + System.DateTime.Today.Date()
        mm.Body = "Name:" + Me.txtName.Text + "<br/>" + "<br/>" + "Company:" + Me.txtCompany.Text + "<br/>" + "<br/>" + "Email:" + Me.txtEmail.Text + "<br/>" + "<br/>" + "Message:" + Me.txtMessage.Text + "<br/>" + "<br/>"
        mm.IsBodyHtml = True

        '(3) Create the SmtpClient object 

        Dim smtp As System.Net.Mail.SmtpClient = New System.Net.Mail.SmtpClient("", 80)

        Dim mailAuthentication As System.Net.NetworkCredential = New System.Net.NetworkCredential("email address here", "password here")

        smtp.EnableSsl = True
        smtp.UseDefaultCredentials = False
        smtp.Credentials = mailAuthentication

        '(4) Send the MailMessage (will use the Web.config settings) 

    End Sub
11/20/2007 2:52:30 AM 27051 articles. 1 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 27


First usually the smtp port is 25, not 80, 80 is for http.

Change smtp.EnableSsl = True to smtp.EnableSsl = False


Windows Hosting ASP.NET | Top ASP.NET Hosts | Dedicated Windows Hosting
11/20/2007 9:15:39 AM

I tried and i got this error.  Same thing only on a different line of code now.  As for the port number, i checked with the hosting company and it's 80 for them not 25 but thank you for the comment.

heres the error.


Security Exception

Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Net.Mail.SmtpPermission, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error:

Line 31:         '(3) Create the SmtpClient object 
Line 32: 
Line 33:         Dim smtp As System.Net.Mail.SmtpClient = New System.Net.Mail.SmtpClient("", 80)
Line 34: 
Line 35:         Dim mailAuthentication As System.Net.NetworkCredential = New System.Net.NetworkCredential("", "serbija2785")

Source File: d:\hosting\ivojinovic\contact.aspx.vb    Line: 33

Stack Trace:

11/25/2007 4:45:03 PM

Similar Artilces:

System.Net.Mail.SmtpException: Server does not support secure connections
hi.. my problem is that "mail sending function" doesn't work on .. 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: <> <mailSettings><smtp from="" deliveryMethod="Network"> <network host="" port="587" userName="" password="mypassword"></network></sm...

Secure connections: how secure are they?
*QUOTE* ......... both useful and malicious information can be transmitted via network connections. Standard solutions protect computers against threats present in standard network connections, but aren't able to counter threats present in secure connections. Verifying the contents of a secure connection is impossible by virtue of its secure nature, as demonstrated by the different types of protection listed above. As a result, malicious data within secure channels can cause a significant amount of damage, and sometimes more than if it were to be transmitted via a standard, non-s...

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 = (Tex...

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...

security too secure
Name: joe Product: Firefox Summary: security too secure Comments: The security thing won't let me in this sight no matter how I accept, confirm, get certificate, etc. Browser Details: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-GB; rv:1.9.1b4) Gecko/20090423 Firefox/3.5b4 From URL: Note to readers: Hendrix gives no expectation of a response to this feedback but if you wish to provide one you must BCC (not CC) the sender for them to see it. ...

when is secure, secure?
Lo everyone, I wrote a custom authentication handler for PureFTPD, using a combination of authentication methods, for about 4 different types of users. So far, from testing it, it does look to work properly, and does it's job pretty well (and fast). I use #!/usr/bin/perl -W as well as use Strict, and use warnings, and the code returns no errors or warnings when run. I am right to presume that this basically only really tells me the my syntax and structure of the application is right? What's a good way to see whether it is actually SECURE... There is a couple of lines of...

How secure is secure?
Thanks to this group and all the high tech individuals who frequent it I have learned how to protect my PC from the inside out. But what about security risks to my info 'before' it gets to my computer? Like my mail box on the server. Could someone hack into that and thumb through my mail? If so, how would I ever know? (The short story) We have a rogue employee at my work who one day decided to run the web site, she got in tight with the ISP, got tools to set and delete passwords on a protected directory on the server. Who knows if she has telnet access to other things, li...

RE: SMTP server requires a secure connection ..HOW?
Trying to get my password recorvery to send an email but i'm getting the error below.  I setup my config file with my smtp information and seems to be correct.<> <mailSettings> <smtp from="my email addy"> <network host="" password="my password" port="587" userName="my email addy" /> </smtp> </mailSettings> </>  I set up my password recorvery also and everything seems to be okay.<asp:PasswordRecovery ID="...

Security Error connecting to SQL Server using
In our environment, we can successfully connect to SQL server using 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,...

Re: Securing Outlook Express (was Re: need extra security for outlook)
Let me add that only locally initiated (i.e. outbound, not inbound or server) connections should be allowed for Outlook Express. -- Tom "Tom Kluegel" <> wrote in message news:... > For those of us who use Outlook Express, it seems > that the following "should" sufficiently secure it. > Does anyone know differently? > > 1. In Outlook Express, go to "Tools" | "Options..." | > "Security" | "Security Zones", and select > "Restricted sites zone (More secure)". >...

'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...

UserApp redirect non-secure to secure connections
Hi, I have seen various posts on the forum for my problem... I have tried all... But no success :( my problem is the redirect to SSL only (8081 & 8444 in my case since iManager has taken 8080 & 8443) - 8444 is working if you specify it in the URL (so SSL is enabled) - I have changed all instances of 8443 to 8444 in the server.xml file, even the HTTP redirect - I have changed the web.xml file in the .WAR file as specified, I have just moved the description node a few places up, else one would get an error complaining about the "description" node - when I n...

(IN)SECURE Magazine from Net-Security (PDF download)
A little more light reading :-) Latest issue, #13: (86 pages, with ads [not animated ads] - like a printed magazine) Archives of past issues: ISSUE 13 (September 2007) * Interview with Janne Uusilehto, Head of Nokia Product Security * Social engineering social networking services: a LinkedIn example * The case for automated log management in meeting HIPAA compliance * Risk decision making: whose call is it? * Interview with Zulfikar Ramzan, Senior Principal Re...

Treeview on HTTPS server : secure, non secure
My application is to be deployed on HTTPS. Everything is Ok except when using treeviews. Each time a treeview is populated or an item of it is clicked, we get the message "'This page contains both secure and non secure items. .......". I tried the modification suggested by Yvalylo in the file PBCommonUtil.js on the server , and I added a line in the function PB_PopupAddIFrame : oIFrame.src = ""; = "visible"; oPopupDiv.insertAdjacentElement("BeforeBegin", oIFrame); But the warning message is still here....

Web resources about - RE: Server does not support secure connections. -

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 -
If you send more email, you might make more money. Then again, you might destroy your reputation and revenue stream. Here's how to know what ...

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 ...

MOTHER’S DAY: Facebook Examines Connections Between Moms, Kids
With Mother’s Day on the calendar this coming Sunday, Facebook examined the relationships between mothers and their children on the social network, ...

The Direct Connection
... And the people reading my words respond back to me with words of their own. The technology that allows this is powerful but this direct connection ...

Is There A Connection Between Patrick Murphy's Over-The-Top Corruption And His Campaign Emails?
The DCCC may be stupid or even very stupid (as well as utterly incompetent) but their e-mail strategy is very well-planned out. Their overarching ...

CNN: Investigators Find ISIS Connection In San Bernardino Shooting
As the San Bernardino attack was happening, the female shooter, Tashfeen Malik posted on Facebook, pledging allegiance to ISIS leader Abu Bakr ...

Connection And Collaboration In the Cloud
Forbes technology editor Bruce Upbin deconstructs the cloud and maps its potential to your life.

Man wanted in connection to Waco biker shooting arrested in Louisiana
A man wanted in the deadly shootout involving rival motorcycle gangs earlier this year in Texas was arrested in northwest Louisiana on Wednesday, ...

Kidney Donor Connection Made After Misplaced Craigslist Ad
Man whose wife died of kidney failure becoming a donor after seeing misplaced Craigslist ad

Resources last updated: 12/7/2015 2:25:24 AM