SmtpClient smtp = new SmtpClient(smtpServer);
smtp.Send(msgMail);
On second line sometimes this exception is thrown:
System.Net.NetworkInformation.NetworkInformationException:
with Message: "A non-blocking socket operation could not be completed immediately"
What does that mean? What can be the reason?
Mail sending in general is working most times. It's a IIS7 Windows 2008 Server machine.
Thank you.
Edit:
I found something here: http://www.thevbzone.com/modWINSOCK.bas
Public Const WSAEWOULDBLOCK = (WSABASEERR + 35) ' A non-blocking socket operation cou开发者_JAVA技巧ld not be completed immediately
MSDN says about this error (http://msdn.microsoft.com/en-us/library/ms740668%28VS.85%29.aspx):
Resource temporarily unavailable.
This error is returned from operations on nonblocking sockets that
cannot be completed immediately,...
So, what does that mean actually? Should I just ignore the error, resend the mail...? thanks.
First of all you should check ErrorCode property of NetworkInformationException and then find this error code in this ms article. It gives to you more information about exception.
精彩评论