My thoughts regarding ASP.NET, C#, programming practices, and more...
reading
You Should Read archives
blogs I read
|
Thursday, October 07, 2004SmtpMail Errors
I have been sending mail using the System.Web.Mail.SmtpMail class with multiple apps for some time now without any issues when I started getting the following error message:
"Could not access 'CDO.Message' object." Not a very clear error message. I googled the error message and found an excellent resource for trouble shooting the SmtpMail class, System.Web.Mail, OH MY!. The sites subtitle is "Complete FAQ for the System.Web.Mail namespace". It gave me some helpful hints. The first one being "Look at the inner exception". Once I did that, I found that the real error message was: "Unable to open Windows Socket" Once again, the above site gave another helpful hint. I tried specifying the IP address of my SMTP server, in case there was some problems resolving the name. (Yes, I can ping the SMTP server.) This fix lead to a new inner exception: "The message could not be sent to the SMTP server. The transport error code was 0x800ccc15. The server response was not available" OK, now maybe we are getting somewhere. However, when I google this message, I don't get results that are very usefull. According to Microsoft's site here is what the error code means: 0x800CCC15 SOCKET_CONNECT_ERROR Unable to open Windows Socket. That looks familiar. I finally spoke with a friend and found out that this error may have something to do with the load on the mail server and we should restart it. I didn't have time to mess with that. My friend made the following suggestion : "Don't specify and SmtpServer property." When you don't specify the SmtpServer property the SmtpMail class uses your local mail server. That worked. What a pain. Update : We discovered the real reason for this error a few days after my post. The network guys had installed a new version of McAfee VirusScan Enterprise. This software has a feature called "Access Protection" which was preventing my app from accessing the mail server.
Comments:
Content copyright ©2003-2006 Tod Birdsall
I just wanted to say THANK YOU THANK YOU THANK YOU. I've been struggling with this for some time now, and I just read your note about the virus protection software, and viola! that was it.
Post a Comment
You.TheMan = True Links to this post: << Home |