本文介绍了可以将SmtpClient配置为使用自签名证书吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图通过我公司的电子邮件服务器转发电子邮件。服务器将SSL与自签名证书一起使用。当我尝试使用SmtpClient发送时,我得到以下例外: "无法从传输连接中读取数据:net_io_connectionclosed。" 我已尝试挂钩ServicePointManager.ServerCertificateValidationCallback事件,但我没有得到回调。 问候, 亚伦
Hi,I'm attempting to relay an email through my company's emails server. The server uses SSL with a self signed certificate. When I attempt to send with SmtpClient I get an exception of:"Unable to read data from the transport connection: net_io_connectionclosed."I've tried hooking the ServicePointManager.ServerCertificateValidationCallback event but I don't get a callback.Regards,Aaron
推荐答案我认为它应该没问题。 看起来远程端只是在收到它不喜欢的东西时关闭连接。您是否可以启用System.Net跟踪,以便我们可以看到正在发生的事情。请参阅 msdn2.microsoft/en-us/library/ty48b824.aspx &和/或 blogs.msdn/dgorti/archive/2005/09/18/471003.aspx I'd have thought it should be ok.Looks like the remote end is just closing the connection when it gets something it doesn't like. Can you enable System.Net tracing so that we can see what is going on. See see msdn2.microsoft/en-us/library/ty48b824.aspxand/or blogs.msdn/dgorti/archive/2005/09/18/471003.aspx
更多推荐
可以将SmtpClient配置为使用自签名证书吗?
发布评论