当我在 web.config 文件中指定用户名和密码时,我已成功设置运行状况监控,以将 ASP.NET 网页上的错误记录到 Windows 事件日志、SQL Server 数据库以及通过电子邮件 (Microsoft Exchange) 。但是,如果我从指定用户名和密码更改为defaultCredentials="true"
在 web.config 中指定用户名和密码,当它尝试生成电子邮件时,我会在我的 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 文件中?