Click here to Skip to main content
15,887,746 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: system overflow exception on an arithmetic operation Pin
Dave Kreskowiak15-May-16 3:09
mveDave Kreskowiak15-May-16 3:09 
QuestionCOM Interop Pin
JackMisani9-May-16 7:16
JackMisani9-May-16 7:16 
AnswerRe: COM Interop Pin
Nathan Minier10-May-16 1:20
professionalNathan Minier10-May-16 1:20 
GeneralRe: COM Interop Pin
JackMisani10-May-16 2:28
JackMisani10-May-16 2:28 
GeneralRe: COM Interop Pin
Dave Kreskowiak10-May-16 5:02
mveDave Kreskowiak10-May-16 5:02 
SuggestionRe: COM Interop Pin
Richard Deeming10-May-16 8:02
mveRichard Deeming10-May-16 8:02 
GeneralRe: COM Interop Pin
Nathan Minier11-May-16 1:19
professionalNathan Minier11-May-16 1:19 
QuestionSmtpClient not working in Windows Server 2012 R2 Pin
drentsch9-May-16 5:09
drentsch9-May-16 5:09 
Hi,
i wrote a small vb.net console application for sending emails to a gmail-account.
The application works fine on my developement-system ( wondows 10).
When i distribute the application to Windows server 2012 r2 the app did not send the email, the app termine without error but the email was not send.
i try allready to switch firewall off, but without success.
Anybody has a idea what can be wrong?

The code loke like this:

VB.NET
Imports System.IO
Imports System.Net.Mail
Imports System.Net

Sub Main()
Try
Dim loMessage As MailMessage = Nothing
Dim loClient As SmtpClient = Nothing

loClient = New SmtpClient()
loClient.Timeout = 50000
loClient.Host = "smtp.gmail.com"
loClient.Port = 587
loClient.EnableSsl = True
loClient.Credentials = New System.Net.NetworkCredential("test@gmail.com", "xxxxxxxxxx")

loMessage = New MailMessage()
loMessage.IsBodyHtml = True
loMessage.From = New MailAddress("xxxxxx@gmail.com")
loMessage.To.Add(New MailAddress("xxxxxx@bluewin.ch"))
loMessage.Subject = "Betreff"
loMessage.Body = "Test Ihre Daten..."

loClient.Send(loMessage)

Catch ex As Exception
'MsgBox(ex.ToString)
Dim file As System.IO.StreamWriter
file = My.Computer.FileSystem.OpenTextFileWriter("c:\tmp\err.txt", True)
file.WriteLine(ex.ToString)
file.Close()

End Try
End Sub

AnswerRe: SmtpClient not working in Windows Server 2012 R2 Pin
Nathan Minier10-May-16 1:22
professionalNathan Minier10-May-16 1:22 
GeneralRe: SmtpClient not working in Windows Server 2012 R2 Pin
drentsch10-May-16 1:43
drentsch10-May-16 1:43 
Questioncode working on one pc on on another not... Pin
Member 124732905-May-16 22:18
Member 124732905-May-16 22:18 
GeneralRe: code working on one pc on on another not... Pin
Richard MacCutchan5-May-16 23:12
mveRichard MacCutchan5-May-16 23:12 
GeneralRe: code working on one pc on on another not... Pin
Member 124732906-May-16 0:55
Member 124732906-May-16 0:55 
GeneralRe: code working on one pc on on another not... Pin
Richard MacCutchan6-May-16 2:52
mveRichard MacCutchan6-May-16 2:52 
GeneralRe: code working on one pc on on another not... Pin
Member 124732907-May-16 8:07
Member 124732907-May-16 8:07 
GeneralRe: code working on one pc on on another not... Pin
Richard MacCutchan7-May-16 20:40
mveRichard MacCutchan7-May-16 20:40 
GeneralRe: code working on one pc on on another not... Pin
Member 124732908-May-16 5:49
Member 124732908-May-16 5:49 
GeneralRe: code working on one pc on on another not... Pin
Dave Kreskowiak8-May-16 6:55
mveDave Kreskowiak8-May-16 6:55 
GeneralRe: code working on one pc on on another not... Pin
Richard MacCutchan8-May-16 6:57
mveRichard MacCutchan8-May-16 6:57 
AnswerRe: code working on one pc on on another not... Pin
JHizzle11-May-16 0:07
JHizzle11-May-16 0:07 
QuestionOpen database firebird 3 with vb.net Pin
kokyung24-Apr-16 17:17
kokyung24-Apr-16 17:17 
AnswerRe: Open database firebird 3 with vb.net Pin
Pete O'Hanlon24-Apr-16 20:21
mvePete O'Hanlon24-Apr-16 20:21 
GeneralRe: Open database firebird 3 with vb.net Pin
kokyung28-Apr-16 0:03
kokyung28-Apr-16 0:03 
GeneralRe: Open database firebird 3 with vb.net Pin
Sascha Lefèvre28-Apr-16 0:29
professionalSascha Lefèvre28-Apr-16 0:29 
AnswerRe: Open database firebird 3 with vb.net Pin
kokyung28-Apr-16 16:40
kokyung28-Apr-16 16:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.