【发布时间】:2013-01-15 15:06:55
【问题描述】:
我已成功设置运行状况监控,以便将 ASP.NET 网页上的错误记录到 Windows 事件日志、SQL Server 数据库以及通过电子邮件 (Microsoft Exchange)当我在web.config 文件。但是,如果我在 web.config 中从指定用户名和密码更改为 defaultCredentials="true",当它尝试生成电子邮件时,我的 Windows 事件日志中会收到以下错误消息:
System.Web.HttpException (0x80004005): Unable to send out an e-mail to the SMTP
server. Please ensure that the server specified in the <smtpMail> section is
valid. ---> System.Net.Mail.SmtpException: Mailbox unavailable. The server
response was: 5.7.1 Client does not have permissions to send as this sender
我在公司域上运行 Windows Vista。我的 Windows 登录名与我的 Microsoft Exchange 登录名相同。谁能提供一些见解,说明为什么在 web.config 文件中明确指定我的登录凭据有效,但使用 defaultCredentials="true" 无效?是否有任何已知的解决方案可以让我通过 healthMonitoring 自动发送电子邮件,而无需将我的用户名和密码存储在 web.config 文件中?
【问题讨论】:
标签: smtp asp.net-4.0 health-monitoring