H
hazz
smtpClient.Send(message)
is causing me problems as per specifics in the trace below. Email is sent
but not without this error typically upon sending the second email, but
sometimes when running the app, even the first time. The application will
be required to be sending out repeated emails, about one every second or
two.
Must this be done asynchronously? Thank you. -Greg
I get the generic error messages;
Troubleshooting Exceptions: System.ObjectDisposedException 'Safe handle
has been closed'
An ObjectDisposedException exception is thrown when an operation is
attempted on a disposed object, such as a closed stream or registry key.
Make sure you have not released a resource before attempting to use it.
For example, if attempting to manipulate a stream, make sure it has not
been previously closed.
System.Net.Sockets Verbose: 0 : [2568] Exiting Socket#43667493::Send() ->
1024#1024
System.Net.Sockets Verbose: 0 : [2568] Socket#43667493::Send()
System.Net.Sockets Verbose: 0 : [2568] Data from Socket#43667493::Send
System.Net.Sockets Verbose: 0 : [2568] 00000000 : 52 65 63 4E 61 6D 65
7D-3C 42 52 3E 3D 30 44 3D : RecName}<BR>=0D=
System.Net.Sockets Verbose: 0 : [2568] 00000010 : 30 41 54 6F 74 61 6C
4D-6F 76 65 2E 63 6F 6D 3C : 0Axxxx.com<
System.Net.Sockets Verbose: 0 : [2568] 00000020 : 42 52 3E 3D 30 44 3D
30-41 28 38 37 37 29 20 39 : BR>=0D=0A(877) 9
System.Net.Sockets Verbose: 0 : [2568] 00000030 : 36 38 2D 4D 4F 56 45
20-28 36 36 38 33 29 3C 42 : 68-MOVE (6683)<B
System.Net.Sockets Verbose: 0 : [2568] 00000040 : 52 3E 3D 0D 0A 3D 30
44-3D 30 41 7B 52 65 63 45 : R>=..=0D=0A{RecE
System.Net.Sockets Verbose: 0 : [2568] 00000050 : 6D 61 69 6C 7D 3C 42
52-3E 3D 30 44 3D 30 41 3C : mail}<BR>=0D=0A<
System.Net.Sockets Verbose: 0 : [2568] 00000060 : 2F 66 6F 6E 74 3E 3C
2F-74 64 3E 3C 2F 74 72 3E : /font></td></tr>
System.Net.Sockets Verbose: 0 : [2568] 00000070 : 3C 2F 74 61 62 6C 65
3E-3C 2F 62 6F 64 79 3E 3C : </table></body><
System.Net.Sockets Verbose: 0 : [2568] 00000080 : 2F 68 74 6D 6C 3E :
/html>
System.Net.Sockets Verbose: 0 : [2568] Exiting Socket#43667493::Send() ->
134#134
System.Net.Sockets Verbose: 0 : [2568] Socket#43667493::Send()
System.Net.Sockets Verbose: 0 : [2568] Data from Socket#43667493::Send
System.Net.Sockets Verbose: 0 : [2568] 00000000 : 0D 0A : ..
System.Net.Sockets Verbose: 0 : [2568] Exiting Socket#43667493::Send() ->
2#2
System.Net.Sockets Verbose: 0 : [2568] Socket#43667493::Send()
System.Net.Sockets Verbose: 0 : [2568] Data from Socket#43667493::Send
System.Net.Sockets Verbose: 0 : [2568] 00000000 : 0D 0A 2E 0D 0A : .....
System.Net.Sockets Verbose: 0 : [2568] Exiting Socket#43667493::Send() ->
5#5
System.Net.Sockets Verbose: 0 : [2568] Socket#43667493::Receive()
System.Net.Sockets Verbose: 0 : [2568] Data from Socket#43667493::Receive
System.Net.Sockets Verbose: 0 : [2568] 00000000 : 32 35 30 20 4D 61 69
6C-20 71 75 65 75 65 64 20 : 250 Mail queued
System.Net.Sockets Verbose: 0 : [2568] 00000010 : 66 6F 72 20 64 65 6C
69-76 65 72 79 2E 0D 0A : for delivery...
System.Net.Sockets Verbose: 0 : [2568] Exiting
Socket#43667493::Receive() -> 31#31
System.Net Verbose: 0 : [2568] Exiting SmtpClient#25675301::Send()
System.Net.Sockets Verbose: 0 : [5560] Socket#57792633:ispose()
System.Net.Sockets Verbose: 0 : [5560] Socket#57792633::Shutdown(Both#2)
System.Transactions Critical: 0 : <TraceRecord
xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord"
Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled
exception</Description><AppDomain>LeadProcessingServiceConsole.vshost.exe</AppDomain><Exception><ExceptionType>System.ObjectDisposedException,
mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Safe handle has been
closed</Message><StackTrace> at
System.Net.UnsafeNclNativeMethods.OSSOCK.shutdown(SafeCloseSocket
socketHandle, Int32 how)
at System.Net.Sockets.Socket.Shutdown(SocketShutdown how)
at
?.Finalize()</StackTrace><ExceptionString>System.ObjectDisposedException:
Safe handle has been closed
at System.Net.UnsafeNclNativeMethods.OSSOCK.shutdown(SafeCloseSocket
socketHandle, Int32 how)
at System.Net.Sockets.Socket.Shutdown(SocketShutdown how)
at ?.Finalize()</ExceptionString></Exception></TraceRecord>
System.Net Error: 0 : [5560] Exception in the
#62476613::UnhandledExceptionHandler - Safe handle has been closed
System.Net Error: 0 : [5560] at
System.Net.UnsafeNclNativeMethods.OSSOCK.shutdown(SafeCloseSocket
socketHandle, Int32 how)
at System.Net.Sockets.Socket.Shutdown(SocketShutdown how)
at ?.Finalize()
is causing me problems as per specifics in the trace below. Email is sent
but not without this error typically upon sending the second email, but
sometimes when running the app, even the first time. The application will
be required to be sending out repeated emails, about one every second or
two.
Must this be done asynchronously? Thank you. -Greg
I get the generic error messages;
Troubleshooting Exceptions: System.ObjectDisposedException 'Safe handle
has been closed'
An ObjectDisposedException exception is thrown when an operation is
attempted on a disposed object, such as a closed stream or registry key.
Make sure you have not released a resource before attempting to use it.
For example, if attempting to manipulate a stream, make sure it has not
been previously closed.
System.Net.Sockets Verbose: 0 : [2568] Exiting Socket#43667493::Send() ->
1024#1024
System.Net.Sockets Verbose: 0 : [2568] Socket#43667493::Send()
System.Net.Sockets Verbose: 0 : [2568] Data from Socket#43667493::Send
System.Net.Sockets Verbose: 0 : [2568] 00000000 : 52 65 63 4E 61 6D 65
7D-3C 42 52 3E 3D 30 44 3D : RecName}<BR>=0D=
System.Net.Sockets Verbose: 0 : [2568] 00000010 : 30 41 54 6F 74 61 6C
4D-6F 76 65 2E 63 6F 6D 3C : 0Axxxx.com<
System.Net.Sockets Verbose: 0 : [2568] 00000020 : 42 52 3E 3D 30 44 3D
30-41 28 38 37 37 29 20 39 : BR>=0D=0A(877) 9
System.Net.Sockets Verbose: 0 : [2568] 00000030 : 36 38 2D 4D 4F 56 45
20-28 36 36 38 33 29 3C 42 : 68-MOVE (6683)<B
System.Net.Sockets Verbose: 0 : [2568] 00000040 : 52 3E 3D 0D 0A 3D 30
44-3D 30 41 7B 52 65 63 45 : R>=..=0D=0A{RecE
System.Net.Sockets Verbose: 0 : [2568] 00000050 : 6D 61 69 6C 7D 3C 42
52-3E 3D 30 44 3D 30 41 3C : mail}<BR>=0D=0A<
System.Net.Sockets Verbose: 0 : [2568] 00000060 : 2F 66 6F 6E 74 3E 3C
2F-74 64 3E 3C 2F 74 72 3E : /font></td></tr>
System.Net.Sockets Verbose: 0 : [2568] 00000070 : 3C 2F 74 61 62 6C 65
3E-3C 2F 62 6F 64 79 3E 3C : </table></body><
System.Net.Sockets Verbose: 0 : [2568] 00000080 : 2F 68 74 6D 6C 3E :
/html>
System.Net.Sockets Verbose: 0 : [2568] Exiting Socket#43667493::Send() ->
134#134
System.Net.Sockets Verbose: 0 : [2568] Socket#43667493::Send()
System.Net.Sockets Verbose: 0 : [2568] Data from Socket#43667493::Send
System.Net.Sockets Verbose: 0 : [2568] 00000000 : 0D 0A : ..
System.Net.Sockets Verbose: 0 : [2568] Exiting Socket#43667493::Send() ->
2#2
System.Net.Sockets Verbose: 0 : [2568] Socket#43667493::Send()
System.Net.Sockets Verbose: 0 : [2568] Data from Socket#43667493::Send
System.Net.Sockets Verbose: 0 : [2568] 00000000 : 0D 0A 2E 0D 0A : .....
System.Net.Sockets Verbose: 0 : [2568] Exiting Socket#43667493::Send() ->
5#5
System.Net.Sockets Verbose: 0 : [2568] Socket#43667493::Receive()
System.Net.Sockets Verbose: 0 : [2568] Data from Socket#43667493::Receive
System.Net.Sockets Verbose: 0 : [2568] 00000000 : 32 35 30 20 4D 61 69
6C-20 71 75 65 75 65 64 20 : 250 Mail queued
System.Net.Sockets Verbose: 0 : [2568] 00000010 : 66 6F 72 20 64 65 6C
69-76 65 72 79 2E 0D 0A : for delivery...
System.Net.Sockets Verbose: 0 : [2568] Exiting
Socket#43667493::Receive() -> 31#31
System.Net Verbose: 0 : [2568] Exiting SmtpClient#25675301::Send()
System.Net.Sockets Verbose: 0 : [5560] Socket#57792633:ispose()
System.Net.Sockets Verbose: 0 : [5560] Socket#57792633::Shutdown(Both#2)
System.Transactions Critical: 0 : <TraceRecord
xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord"
Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled
exception</Description><AppDomain>LeadProcessingServiceConsole.vshost.exe</AppDomain><Exception><ExceptionType>System.ObjectDisposedException,
mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Safe handle has been
closed</Message><StackTrace> at
System.Net.UnsafeNclNativeMethods.OSSOCK.shutdown(SafeCloseSocket
socketHandle, Int32 how)
at System.Net.Sockets.Socket.Shutdown(SocketShutdown how)
at
?.Finalize()</StackTrace><ExceptionString>System.ObjectDisposedException:
Safe handle has been closed
at System.Net.UnsafeNclNativeMethods.OSSOCK.shutdown(SafeCloseSocket
socketHandle, Int32 how)
at System.Net.Sockets.Socket.Shutdown(SocketShutdown how)
at ?.Finalize()</ExceptionString></Exception></TraceRecord>
System.Net Error: 0 : [5560] Exception in the
#62476613::UnhandledExceptionHandler - Safe handle has been closed
System.Net Error: 0 : [5560] at
System.Net.UnsafeNclNativeMethods.OSSOCK.shutdown(SafeCloseSocket
socketHandle, Int32 how)
at System.Net.Sockets.Socket.Shutdown(SocketShutdown how)
at ?.Finalize()